Which editing mode did you used ?
To avoid such issues please use the VisualEditor plugins whenever possible
Hi. Thanks for the quick reply.
I am using Classic Editor in Text mode. I’m now trying the Visual Editor but I can’t get it to work. I tried
The solution that worked was installing https://wordpress.org/plugins/raw-html/ and wrapping the double hyphens like [raw]--[/raw]
.
Alternatively I used the HTML code for hyphen, like ––
If I don’t use one of those methods it turns this sudo firewall-cmd --reload
into sudo firewall-cmd — reload
Which Enlighter editing mode did you used ? Markdown, Shortcodes, HTML ?
The Visual Editor plugins are created to avoid such issues – everything within is immutable.
I don’t know if I understand this very well.
In the WordPress Visual Editor I’m seeing Insert Code
and Code Settings
are those what you refer to as the plugins? Those are the only thing related to Enlighter that I’m seeing in the Visual Editor. I inserted my codes using Insert Code
Like this: https://i.ibb.co/G7w6RNr/image.png
With regard to the editing mode, I don’t know where I’d choose an editing mode in the Visual Editor. I’ve seen Markdown, Shortcodes and HTML in the Editing
section of the plugin’s settings – Markdown is Enabled, Shortcodes and Text/RAW are disabled. But I assumed that by inserting code via Insert Code
then my code would be independent of those settings.
That’s the correct way but you shouldn’t switch between visual and text mode…this may breaks the code.
I’ve just tried to reproduce the issues but everything works as expected (no transforms are applied) – therefore i would assume that one of your other plugins or theme is altering the content
Hello.
Understood. I thought it may have been caused by an Enlighter update, as it did not always behave like this.
Thank you very much for all your help, patience, and very fast replies! I very much appreciate it.
I’ll update what’s causing this if I figure it out, for posterity.
-
This reply was modified 5 months, 1 week ago by
JojoThonk. Reason: Mentioned I'll update
just FYI
Testcase:
https://media.andidittrich.com/2020/08/Screenshot_2020-08-12_10-34-54.png
Result:
https://media.andidittrich.com/2020/08/Screenshot_2020-08-12_09-39-18.png
Technically the “Editor Plugins” are just inserting a pre
tag with additional EnlighterJS related attributes. WordPress normally excludes pre tags from being filtered – dashes are only transformed in regular paragraphs.
Therefore i would assume that another plugin or your theme is adding an additional filter to the content.
I understand. The theme did come with a few plugins that have multiple content formatting related features.
I had a recording of that post from a few weeks ago when making a video tutorial, and I can confirm that everything was looking good.
I ran some updates yesterday, and I’m assuming something went wrong there.
Thanks so much all your help and I hope I didn’t take too much of your time.