• <" />
  • <" />
  • <"/>

    TinyMce Code plugin - Font Awesome / List

    18 Views Asked by At

    I am using TinyMce 4.1.3 Code plugin in MVC 5 application. When I insert

     <ul class="fa-ul">
        <li><i class="fa-li fa fa-square" style="color: #f9a01b"></i> text </li>
     </ul>
    

    The Code plugin saves it as

     <ul class="fa-ul">
        <li>text </li>
     </ul>
    

    Is there a workaournd this!

    1

    There are 1 best solutions below

    0
    Oyinlade Demola On BEST ANSWER

    if you want to add some specific elements that also should be valid you can use the below source: https://www.tiny.cloud/docs-4x/configure/content-filtering/#extended_valid_elements

    tinymce.init({
      // other options...
      extended_valid_elements: "i[class|style]",
    });