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
- Forum
- JCE Editor
- JCE moving html tags to where I don't want them
Support is currently Offline
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
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.
Hi,
I am using JCE Pro 2.6.10
I have this section of HTML:
But, JCE changes it so that the text is wrapped in the H1 tags, which I don't want. It looks like this:
Joomla's global config for the super admin is set to no filtering. The HTML stays consistent in RokPad and renders as expected.
JCE has the following settings:
What do I need to set so that JCE won't do this?
Thank you,
Karen
I am using JCE Pro 2.6.10
I have this section of HTML:
<h1 class="g-title">
<div class="g-rectangles-before">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
About the Company
<div class="g-rectangles-after">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
</h1>
But, JCE changes it so that the text is wrapped in the H1 tags, which I don't want. It looks like this:
<div class="g-rectangles-before">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
<h1 class="g-title">About Works Global</h1>
<div class="g-rectangles-after">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
Joomla's global config for the super admin is set to no filtering. The HTML stays consistent in RokPad and renders as expected.
JCE has the following settings:
- in global as well as profile, validate HTML is set to no
- in global, Container Element & Enter Key is set to "no container and paragraph on enter"
- in global, doctype is set to mixed
- in profile, doctype is set to inherit
- in profile, allow Javascript, CSS, PHP, and XHTML Inline Scripts all set to yes
- These are the settings within the source code tab, see screen shot: http://take.ms/9b3BR
What do I need to set so that JCE won't do this?
Thank you,
Karen
Quite simply, the rules of HTML do not all the <h1> tag to contain <div> tags.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
<h1> to <h6> tags can only contain phrasing content - https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
<h1> to <h6> tags can only contain phrasing content - https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
Just because you're not paranoid doesn't mean everybody isn't out to get you.
more than a month ago
·
#91310
OK.
In the meantime, what do I need to set so that JCE won't do this?
In the meantime, what do I need to set so that JCE won't do this?
The first thing to consider, if the <h1> tag is only being used structurally, and not to represent a heading, is to replace it with a div, eg:
Or, you could change the <div> tags to span tags, thus making them valid children of the <h1> tag, eg:
As a last resort, in the Editor Global Configuration, add:
to the Custom Configuration Variables field.
Please note that this setting can cause unintended consequences, as it sometimes affects the cleanup of core system markup.
<div class="g-title">
<div class="g-rectangles-before">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
About the Company
<div class="g-rectangles-after">
<div class="rectangle1"> </div>
<div class="rectangle2"> </div>
<div class="rectangle3"> </div>
</div>
</div>
Or, you could change the <div> tags to span tags, thus making them valid children of the <h1> tag, eg:
<h1 class="g-title">
<span class="g-rectangles-before">
<span class="rectangle1"> </span>
<span class="rectangle2"> </span>
<span class="rectangle3"> </span>
</span>
About the Company
<span class="g-rectangles-after">
<span class="rectangle1"> </span>
<span class="rectangle2"> </span>
<span class="rectangle3"> </span>
</span>
</h1>
As a last resort, in the Editor Global Configuration, add:
validate:false
to the Custom Configuration Variables field.
Please note that this setting can cause unintended consequences, as it sometimes affects the cleanup of core system markup.
Just because you're not paranoid doesn't mean everybody isn't out to get you.
more than a month ago
·
#91359
Thanks, Ryan.
In the global configuration, I've had "Validate HTML" set to no. Is this not working as intended such that I need to add the validate:false to the custom configuration variables? Perhaps I need to learn more about the validate HTML setting. Is there a further documentation that I could read that lists what is or is not affected when using the validate HTML yes/no setting?
I appreciate your explanation and suggestions for the HTML example that I used. At this moment, I am looking for the correct setting to make sure that JCE does not alter the HTML. I can add the custom configuration but also want to know if there's something that I can use in the regular settings to achieve the same thing. Should the doctype be set differently?
In the global configuration, I've had "Validate HTML" set to no. Is this not working as intended such that I need to add the validate:false to the custom configuration variables? Perhaps I need to learn more about the validate HTML setting. Is there a further documentation that I could read that lists what is or is not affected when using the validate HTML yes/no setting?
I appreciate your explanation and suggestions for the HTML example that I used. At this moment, I am looking for the correct setting to make sure that JCE does not alter the HTML. I can add the custom configuration but also want to know if there's something that I can use in the regular settings to achieve the same thing. Should the doctype be set differently?
In the global configuration, I've had "Validate HTML" set to no. Is this not working as intended such that I need to add the validate:false to the custom configuration variables?
In the past, this did also set the validate option to false, but I removed this as it was causing some issues in other places.
I think I have resolved these in JCE 2.6.12 Beta 3, and so setting Verify HTML to No should behave as before.
You can download JCE Pro 2.6.12 Beta 3 here - https://www.joomlacontenteditor.net/downloads/editor/item/jce-pro-2612-dev
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!