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.

#105319 Code being stripped

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 [email protected] on Friday, 18 September 2020 05:29 BST

[email protected]
Joomla 3.9.16 / JCE Editor 2.8.11

The following code works and is what I want (a whole module DIV link):
<a style="display: block;" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536">
<div class="projhover">
<h3>Aged Care</h3>
<ul>
<li>Churches of Christ</li>
<li>Holy Spirit Aged Care</li>
</ul>
</div></a>

Upon saving it gets stripped to (individual list item links):
<p><a style="display: block;" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536"></a></p>
<div class="projhover">
<h3><a style="display: block;" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536">Aged Care</a></h3>
<ul>
<li><a style="display: block;" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536">Churches of Christ</a></li>
<li><a style="display: block;" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536">Holy Spirit Aged Care</a></li>
</ul>
</div>

If client adds a new list item but does not understand the coding, the DIV link for the whole block gets removed

JCE Editor modifications made in an attempt to save code:
Filtering - Set to No Filtering
'Editor Parameters' - 'Cleanup and Output' Setting - I set the Validate HTML setting to - No
'Advanced' Settings - 'Allow Javascript', 'Allow CSS' and 'Allow PHP' to - Yes
'Plugin Parameters' - 'media support settings' - 'Allow IFrames' to Yes

Anyone able to assist so the 'top' code stays intact?
Many thanks.

Ryan
Unfortunately Tinymce (on which JCE is based) does not support block elements (<div>, <p> etc.) inside amchor element (<a>) which is why the code is re-organised. You might try changing the code slghtly to:

<div class="projhover">
    <a href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=39&Itemid=536" style="display: block;">
        <h3>Aged Care</h3>
        <ul>
            <li>Churches of Christ</li>
            <li>Holy Spirit Aged Care</li>
        </ul>
    </a>
</div>

Ryan Demmer

Lead Developer / CEO / CTO

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

[email protected]
Many thanks - that worked - now customer has changed their mind anyway!!! Ahhh...:D