You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#101681 Keep Markup indentation in code editor

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 15 November 2019 19:47 GMT

Webatelier47
Hello, when i write html code in code editor with good indentation then i switch to WYSIWYG HTML editor i go back to code editor and my markup is break, any solution to keep correct markup.

see screenr https://www.loom.com/share/0cc52e55e7a64a1c8d6700fa62322f57

thanks.

2.8.0-rc19

Ryan
any solution to keep correct markup.


Unfortunately this is not possible. When content is loaded into the editor (or when switching from the Code tab to the Editor tab), HTML is converted into a format in which it can be more easily and efficiently manipulated, then converted back to HTML for display in the editor. This process removes the whitespace (tabs, spacing etc.) between HTML tags, which is irrelevant to the rendering and display of HTML.

The Code editor does attempt to format the HTML again for readability when you switch to the Code tab, but any custom formatting you may have added before would have been removed.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.