Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.96k stars 606 forks source link

Adding <i> </i> with any Favicon icon and its automatically creating <SVG> tags. #1432

Closed arpit1188 closed 7 months ago

arpit1188 commented 7 months ago

Hello,

Here, I am using Trumbowyg editor in my project. I am using Boiler Plate Code of Mixcore CMS. Could you please help me with this.

Actually when I am trying to add code this in source code:

<p>hello</p><p><br></p>

<label class="click_aerrow">
     <i class="fa fa-angle-down"></i> 
</label>

it's Automatically converting this code later with SVG tags like below:

<p>hello</p><p><br></p>

<label class="click_aerrow">
     <svg class="svg-inline--fa fa-angle-down fa-w-10" aria-hidden="true" focusable="false" data-prefix="fa" data-icon="angle-down" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" data-fa-i2svg=""><path fill="currentColor" d="M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"></path></svg><!-- <i class="fa fa-angle-down"></i> --> 
</label>

I don't want to use SVGs in my code. so any ways I can stop this ?

Alex-D commented 7 months ago

That's not a Trumbowyg-related issue since Trumbowyg does not update the HTML of your icons or so :/

arpit1188 commented 7 months ago

@Alex-D So, is it issue from MixCore Repo ?

Here is the actual issue showing as recording:

https://github.com/Alex-D/Trumbowyg/assets/124252403/d764f9ed-765e-4bbc-81a4-762cac2da7f3

arpit1188 commented 7 months ago

@Alex-D, I got the solution with the help of MixCore Team

// Ref: https://stackoverflow.com/questions/49983637/prevent-svg-translation-of-fontawesome

// Notice how this gets configured before we load Font Awesome

<script type="text/javascript">
   window.FontAwesomeConfig = { autoReplaceSvg: false }
</script>