Jump to content

<i> tag failed to display from CKEditor


kradzcalypse
 Share

Recommended Posts

<div class="krown-text-icon style-four">
    <a href="social-media/index.html" target="_self">
        <i class="krown-icon-bubble" style="color:#e64d36"></i>
        <h3>Some text</h3>
    </a>
    <div class="content">
        <p>Some text.</p>
    </div>
</div>

The <i></i> tag got stripped away when I copy and paste them into text area field with CKEditor.

I'm using this to display icons.

Can anybody tell me how to allow the <i></i> tags in my fields ?

Thank you.

Link to comment
Share on other sites

The issue is the empty <i> tag. You could try:

<i class="krown-icon-bubble" style="color:#e64d36"> </i>

Otherwise, the recommended approach seems to be this setting:

// allow i tags to be empty (for font awesome)
CKEDITOR.dtd.$removeEmpty['i'] = false
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...