Support » Plugin: Enlighter - Customizable Syntax Highlighter » code is always grey

  • Resolved meisterleise

    (@meisterleise)


    Hey, I’ve installed this plugin right now. But it seems not to work.
    No matter which settings I use, the code on the frontend is always grey. Any ideas why?

    Screenshot
    WP5.5.3 · Classic Editor

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter meisterleise

    (@meisterleise)

    {
    “translation-enabled”: true,
    “enlighterjs-init”: “inline”,
    “enlighterjs-assets-js”: true,
    “enlighterjs-assets-themes”: true,
    “enlighterjs-assets-themes-external”: false,
    “enlighterjs-selector-block”: “pre.EnlighterJSRAW”,
    “enlighterjs-selector-inline”: “code.EnlighterJSRAW”,
    “enlighterjs-indent”: 4,
    “enlighterjs-ampersandcleanup”: true,
    “enlighterjs-linehover”: true,
    “enlighterjs-rawcodedbclick”: false,
    “enlighterjs-textoverflow”: “break”,
    “enlighterjs-linenumbers”: true,
    “enlighterjs-theme”: “enlighter”,
    “enlighterjs-retaincss”: false,
    “enlighterjs-language”: “generic”,
    “toolbar-visibility”: “default”,
    “toolbar-button-raw”: true,
    “toolbar-button-copy”: true,
    “toolbar-button-window”: true,
    “toolbar-button-enlighterjs”: true,
    “tinymce-backend”: true,
    “tinymce-frontend”: false,
    “tinymce-formats”: true,
    “tinymce-autowidth”: false,
    “tinymce-tabindentation”: false,
    “tinymce-keyboardshortcuts”: false,
    “tinymce-font”: “sourcecodepro”,
    “tinymce-fontsize”: “0.7em”,
    “tinymce-lineheight”: “1.4em”,
    “tinymce-color”: “#000000”,
    “tinymce-bgcolor”: “#f9f9f9”,
    “gutenberg-backend”: true,
    “quicktag-backend”: false,
    “quicktag-frontend”: false,
    “quicktag-mode”: “html”,
    “shortcode-mode”: “disabled”,
    “shortcode-inline”: true,
    “shortcode-type-generic”: true,
    “shortcode-type-language”: false,
    “shortcode-type-group”: false,
    “shortcode-filter-content”: true,
    “shortcode-filter-excerpt”: true,
    “shortcode-filter-widget”: false,
    “shortcode-filter-comment”: false,
    “shortcode-filter-commentexcerpt”: false,
    “gfm-enabled”: false,
    “gfm-inline”: true,
    “gfm-language”: “raw”,
    “gfm-filter-content”: true,
    “gfm-filter-excerpt”: true,
    “gfm-filter-widget”: false,
    “gfm-filter-comment”: false,
    “gfm-filter-commentexcerpt”: false,
    “compat-enabled”: false,
    “compat-crayon”: false,
    “compat-codecolorer”: false,
    “compat-type1”: false,
    “compat-type2”: false,
    “compat-filter-content”: true,
    “compat-filter-excerpt”: true,
    “compat-filter-widget”: false,
    “compat-filter-comment”: false,
    “compat-filter-commentexcerpt”: false,
    “cache-custom”: false,
    “cache-path”: “”,
    “cache-url”: “”,
    “dynamic-resource-invocation”: false,
    “ext-infinite-scroll”: false,
    “jetpack-gfm-code”: false,
    “ext-ajaxcomplete”: false,
    “bbpress-shortcode”: false,
    “bbpress-markdown”: false
    }

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    please provide a link to your page + demo post.
    mostly it’s caused by optimization/caching plugins (missing EnlighterJS resources)

    Thread Starter meisterleise

    (@meisterleise)

    Thanks a lot for your quick response! Yes, you’re right. Enlighter has problems with “autoptimize” and “Async Javascript”. I could have thought of that myself. But I’m testing different syntax highlighters and the others had no problems.

    Anyway – can you tell me which scripts I’ve to exclude to get it work?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    It’s a common issue with “optimization” plugins because they didn’t know anything of the plugin structure and just applying the defer/async flags…

    Exclude everything in the enlighter plugin directory – see https://github.com/EnlighterJS/documentation/blob/master/wordpress/Troubleshooting.md

    Or you have to use the “merged” mode where the init code is added to the library (Enlighter – Options – Resources – Initialization)

    Thread Starter meisterleise

    (@meisterleise)

    Okay, it works now! 🙂
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘code is always grey’ is closed to new replies.