EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
115 stars 17 forks source link

Insert code in text editor #306

Closed bclothier closed 3 years ago

bclothier commented 3 years ago

Normally when I edit blog articles, I use text editor; the "visual" is too clunky and cumbersome for me to even want to use it.

However, there is no button on the text editor to insert the code. Furthermore, the documentation does not really discuss the usage with text editor besides a comment that shortcodes is to be used only there but without any explanation what shortcodes are recognized etc.

I've resorted to inserting the code via visual editor, switching back to text editor then copying'n'pasting the generated HTML but that feels really clunky....

AndiDittrich commented 3 years ago

raw html editing is absolutely not recommended due to filters like wpautop and missing html escape sequences....therefore this kind of editing mode is not documented to avoid issues with regular users/beginners.

a list of all available shortcodes can be found within the contextual help (dynamically generated)

bclothier commented 3 years ago

That is unfortunate. We used to use Crayon and it worked even in the text editor. We had to switch to Enlighter since Crayon did not keep itself updated with Wordpress and I'm sorely missing this functionality. I do not want to use the horrid visual editor.

AndiDittrich commented 3 years ago

i don't understand your issue.... shortcodes+markdown are designed to be used in text mode.

additionally Enlighter provides full QuickTag integration (shortcodes or html) for the text editor..just enable it

the shortcode documentation is available on the contextual help tabs

AndiDittrich commented 3 years ago

in case it helps: we can remove all shortcode related docs from the contextual help and move it into the documentation

bclothier commented 3 years ago

shortcodes+markdown are designed to be used in text mode.

I might have misunderstood your earlier reply - I understood that text editing was not recommended and thus need to use visual editor.

full QuickTag integration

Ok, that's probably what I'm after. However, I can't find where to enable it?

AndiDittrich commented 3 years ago

Enlighter -> Editing -> Text/RAW -> QuickTag

you don't need to use the visual editor...but it's for most users the best method to avoid weird issues

language identifier list: https://github.com/EnlighterJS/Plugin.WordPress/blob/master/modules/core/LanguageManager.php

bclothier commented 3 years ago

To be honest I completely missed that there are tabs on the top of Enlighter -> Editing section.

Thank you very much. I will give the quicktags a try.

AndiDittrich commented 3 years ago

the documentation has been moved to https://github.com/EnlighterJS/documentation/blob/master/editing/Shortcode.md