- Enable the compatibility mode:
Enlighter -> Compatibility -> Compatibility Mode -> enable
- Select the filter targets (sections which should be converted)
Enlighter -> Compatibility -> Compatibility Mode -> Filter Targets
- Enable crayon compatibility filters:
Enlighter -> Compatibility -> Crayon -> enable
- Enable the compatibility mode:
Enlighter -> Compatibility -> Compatibility Mode -> enable
- Select the filter targets (sections which should be converted)
Enlighter -> Compatibility -> Compatibility Mode -> Filter Targets
- Enable CodeColorer compatibility filters:
Enlighter -> Compatibility -> CodeColorer -> enable
No, you can't use Enlighter together with the Crayon Syntax highlighter because it may take over the Enlighter elements.
If possible, use the Gutenberg or Classic Editor mode! The use of Shortcode is only recommended when working in Text-Mode. By switching to the Visual-Editor-Mode whitespaces (linebreaks, indents, ..) within the shortcode will get removed by the editor - using Visual-Editor mode will avoid such problems.
You have to enable the full toolbar by clicking on the Show/Hide Kitchen Sink button (last icon on the toolbar)
The directory /wp-content/plugins/enlighter/cache/
must be writable - the generated css files as well as some cached content will be stored there for performance reasons. Try to set chmod to 0644
or 0770
The cache-directory wp-content/plugins/enlighter/cache
have to be writable, the generated stylesheet will be stored there. Set the directory permission (chmod) to 0644
or 0777
The complete EnlighterJS project can be found on GitHub
Of course, the filter hook enlighter_startup can be used to terminate the plugin initialization
This issue is mostly caused by "optimization plugins" which are adding the attributes async defer
to the script tag - this breaks the EnlighterJS initialization.
Please exclude the EnlighterJS resources (wp-content/plugins/enlighter/resources/*
) from any optimization plugins - the javascript files are already optimized!.
btw. take a look into the MDN docs what the attributes really cause (they break the execution ordering)
Such issue is related to caching plugins like WP Super Cache, W3 Total Cache or caching CDNs - after applying changes to your WordPress site (like installing a new plugin) you have to clear/purge the caches - otherwise the "old" content without the EnlighterJS codeblocks/resources will be used. Logged-in users (especially admin/manager roles) are excluded by most caching plugins.
To enable highlighting of markdown codeblocks created by the Jetpack plugin you have to follow these steps:
- Enable "Markdown" editing method within Enlighter Settings (Page Editing)
- Enable Jetpack markdown support within Enlighter Settings (Page Extensions -> Jetpack)
- Edit+Save the post/page written in markdown! This is required due to the fact that Jetpack applies the markdown rendering with the "on-save" action - the Enlighter extension just forces the markdown renderer to exclude codeblocks from rendering.
If you want to use shortcodes (as sourcecode) within an Enlighter codeblock don't forget to escape the square brackets using double brackets [[shortcode]]
This is common issue but not related to Enlighter: the wptexturize filter seems to be activated by another plugin or your theme.