How do I stop JCE striping out inline svg's?
I also need to have xlink's within the SVG.
Cheers. - Dave.
A content editor for Joomla!®
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
Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Latest post by Ryan on Thursday, 02 November 2023 10:02 GMT
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
<p></p>
<div class="my-selector">
<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 48 48" width="48px" height="48px">
<path fill="#3F51B5" d="M42,37c0,2.762-2.238,5-5,5H11c-2.761,0-5-2.238-5-5V11c0-2.762,2.239-5,5-5h26c2.762,0,5,2.238,5,5V37z"></path>
<path fill="#FFF" d="M34.368,25H31v13h-5V25h-3v-4h3v-2.41c0.002-3.508,1.459-5.59,5.592-5.59H35v4h-2.287C31.104,17,31,17.6,31,18.723V21h4L34.368,25z"></path>
</svg>
</div>
<p></p>
>>>
<p></p>
<div class="my-selector"> </div>
<p></p>
However, as soon as I enclose the SVG code in a DIV tag or a p-tag, for example, the SVG code is removed and only the enclosing DIV tag remains.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
What I found: When I try this in a custom joomla-module with editor, it works without deleting the SVG code, the same code is deleted when saving a Joomla article.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
If I insert the SVG graphic at the lowest level, the XML code is displayed. If I put it in a DIV or P tag, then the SVG icon is displayed graphically.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Please try 1.0.3 of the SVG plugin - https://github.com/widgetfactory/jce-editor-svg/releases/tag/1.0.3
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Your post is being submitted…