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.

#102685 Hold format of html code (Pretty Code)

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 Monday, 11 May 2020 10:04 BST

nphic
Folks,

I use html code in my webpages many times. I format the code so it looks "pretty and easy to read". When I save the article in Joomla, the code gets all smashed together and I lose my formatting. Is there a way I can configure JCE Editor to hold my code format?

Thanks,
Joe

Ryan
Formatting can only be retained if the content is saved while in the Code tab.

By default however, the Code tab does process and validate the HTML, removing formatting, so this needs to be disabled first.

In Editor Profiles -> Plugin Parameters -> Source Code Tab, set Validate Content to No.

Ryan Demmer

Lead Developer / CEO / CTO

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

keithvb
I have the same problem. All my html formating (for readability) is gone when I switch back from code to editor.

Ryan
When you switch to the Editor tab, the code is processed, which results in the whitespace (tabs, returns, spaces between tags) being removed. When you switch back to the Code tab, the code is formatted again for readability.

Ryan Demmer

Lead Developer / CEO / CTO

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