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
From 09:00 To 17:00 Europe/London (BST)

Please post your question in the Forum and we will get back to you as soon as we can.

  Tuesday, 28 December 2021
  13 Replies
  747 Visits
I prefer the editor code to stay as I format it and not mesh together after I save it. It makes it more difficult to find points to edit. Very aggravating.


<p style="padding-left: 20px; align: justify;"><b>Learning the truth about <i>Christian Religion</i>. <br /><br />
Learn about God, the Bible and Christianity. <br /><br />
Do I really want to go to heaven? Am I a Christian?<br /><br />
What must I do to be saved? How do I become a Christian?<br /><br />
What is true worship? Am I worshiping God as He commands? <br /><br />
Where should I worship? Where is the truth being preached? <br /><br />
Apostasy - Can I lose my salvation or is it really once saved always saved? <br /><br />
What is the sinners prayer, where did it originate, and can it save me? <br /><br />


Should not look like this after saving...

<p style="padding-left: 20px; align: justify;"><b>Learning the truth about <i>Christian Religion</i>. <br /><br /> Learn about God, the Bible and Christianity. <br /><br /> Do I really want to go to heaven? Am I a Christian?<br /><br /> What must I do to be saved? How do I become a Christian?<br /><br /> What is true worship? Am I worshiping God as He commands? <br /><br /> Where should I worship? Where is the truth being preached? <br /><br /> Apostasy - Can I lose my salvation or is it really once saved always saved? <br /><br /> What is the sinners prayer, where did it originate, and can it save me? <br /><br />


What am I doing wrong? It's not the word wrap... I tried that, but it still does not retain the formatting.

Regards,
Sonnie
3 weeks ago
·
#109884
I believe this is because of the <br /> code. When I replace it with the <p></p> code it retains the formatting in the code editor.

These articles were written a while back with an editor that inserted page breaks with the carriage return, and I think I got used to using those instead of paragraphs like I probably should have been using.

Regards,
Sonnie
3 weeks ago
·
#109885
The Source Code editor will only break and indent on block elements, eg: <p>, <div>, <h1> etc.

You can retain custom formatting in the Code editor if you save in the Code tab (without toggling to the Editor tab), and if the Validate Content option is set to No in Editor Profiles -> Plugin Parameters -> Code Editor.

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

3 weeks ago
·
#109890
I have indeed discovered this.

I like having the content validated too.

Regards,
Sonnie
2 weeks ago
·
#109900
I also was playing with bringing code from the Ecwid plugin in Joomla articles and modules. Could not get them JCE to leave the code alone on saving, even though I had followed the instructions for Jommla filtering and RSFirewall. Finally got code to stay with no editor, followed by TinyMCE. It's not till I seen this post and remove the validation in JCE that the code no longer get stripped. Works like a charm but lost the validation option. Thanks to Sonnie and Ryan for this post.
2 weeks ago
·
#109902
I also was playing with bringing code from the Ecwid plugin in Joomla articles and modules.


What does this code look like? What was being removed?

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

2 weeks ago
·
#109910
Here it is not validated :

Ecwid Code not validated.png

Here is the differnce

Ecwid Code validated.png
2 weeks ago
·
#109911
Ryan, I'm not a programmer, hope i'm not waisting your time.
2 weeks ago
·
#109912
I have HTML validation turned on and the code keeps its formatting. Are you saying validation causes the code to lose its formatting?

Regards,
Sonnie
2 weeks ago
·
#109913
Sonnie, Yes, it appears that for me (Joomla 4) turning that validation on/off makes the difference.
2 weeks ago
·
#109929
@Marsolais - apart from the formatting, are there any other changes when validation is on?

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

2 weeks ago
·
#109939
Not that I have notice, everything else seems fine.
2 weeks ago
·
#109946
Validation removes whitespace in between HTML elements, such as tabs and spaces, which removes the formatting, an unfortunate consequence of the validation process. HTML formatting of this type is not necessary for the correct rendering of the HTML in the front-end.

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

2 weeks ago
·
#109950
Thank you. This certainly answer my question.
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!