• Hello! Recently installed the plugin, but found out that it’s not supported pre effect in text/html editor mode. Version wordpress 5.2.4.

    I want:
    `js
    var start_x:int = 50;
    var start_y:int = 150;

    if (s=2){
    ____start_x = 150;
    }
    `

    and at the website it shows as:
    var start_x:int = 50;
    var start_y:int = 150;

    if (s=2){
    start_x = 150; <—
    }

    • This topic was modified 5 years, 4 months ago by jeanwinters.
    • This topic was modified 5 years, 4 months ago by jeanwinters.
Viewing 15 replies - 1 through 15 (of 34 total)
  • Plugin Author Andi Dittrich

    (@andi-dittrich)

    Hi,

    please explain

    pre effect in text/html

    are you looking for markdown fenced codeblocks ? they are supported by Enlighter

    Thread Starter jeanwinters

    (@jeanwinters)

    I use markdown (`js) in text-html editor (gutenberg), I press save button and wordpress saves all code text without indentation.

    https://i.ibb.co/k4tHWT1/img-1.jpg
    https://i.ibb.co/H23s24G/img-2.jpg

    • This reply was modified 5 years, 4 months ago by jeanwinters.
    • This reply was modified 5 years, 4 months ago by jeanwinters.
    Plugin Author Andi Dittrich

    (@andi-dittrich)

    you’re using Enlighter in the absolute wrong way…

    Enlighter comes with it’s own “Enlighter Code” Gutenberg blocks – see https://github.com/EnlighterJS/Plugin.WordPress/blob/v3/docs/Usage_GutenbergEditor.md – this block takes care of the indentation, special chars and much more

    if you want to write you post in markdown you should not use Gutenberg – it’s designed as WYSIWYG editor and applies a lot of filter stuff (e.g. strip whitespaces) to the content

    Thread Starter jeanwinters

    (@jeanwinters)

    How can I not to use “gutenberg”? It was installed automatically with update v5 wordpress and embedded. I usually works using text/html editor mode only, I need not visual editor at all. And this bug occurs in text-html editor mode. Should I either install another html-editor plugin or switch off any settings?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    you can install the “classic editor plugin” from the WordPress core team – it restores TinyMCE and disables Gutenberg.

    by using Enlighter you should always use the editor integration (Gutenberg or TinyMCE) – or stay in plain text/html mode with shortcodes or markdown – never every switch between text/html mode and WYSIWYG mode because it will break your html markup/whitespaces.

    btw. your issue is not related to Enlighter

    Thread Starter jeanwinters

    (@jeanwinters)

    I have tried to add new post (with js-code) in console for my site in txt/html editor mode (not WISIWYG mode), and used markdown codeblocks `js, the code indentation are cleared again. And I have used plain text/html mode at once, I have not switched between text/html mode and WYSIWYG mode at all. When press save button all js-code indentation is cleared.

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    your issue is related to Gutenberg – the editor (as well as the “code editing mode”) does not support indentations..

    therefore you should consider to use the “classic editor” or regular Gutenberg editing with the “Enlighter Code” block.

    Thread Starter jeanwinters

    (@jeanwinters)

    Could you tell please how to highlight specific lines in text code using markdown feature?

    • This reply was modified 5 years, 4 months ago by jeanwinters.
    Plugin Author Andi Dittrich

    (@andi-dittrich)

    Thread Starter jeanwinters

    (@jeanwinters)

    I mean how to emphasise 3th line (speciallines) in text code of 10 lines using markdown feature.

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    that’s not supported by the fenced codeblock syntax.

    Thread Starter jeanwinters

    (@jeanwinters)

    Maybe there are some other methods? Special html tags use instead markdown in html/text editor mode (not wysiswyg)?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    you can still use raw EnlighterJS html pre tags with full feature support

    Thread Starter jeanwinters

    (@jeanwinters)

    Where can I read about it, are there examples how to use raw EnlighterJS html tags, please?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    enlighterjs.org

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Why not supported pre in text/html editor’ is closed to new replies.