Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Add allowed empty tag like <i> configuration #30

Open
adiramardiani opened this issue Apr 6, 2015 · 4 comments
Open

Add allowed empty tag like <i> configuration #30

adiramardiani opened this issue Apr 6, 2015 · 4 comments
Labels

Comments

@adiramardiani
Copy link

I added html tag with font awesome tag like empty

<i class="fa fa-camera-retro fa-lg"></i>

tag and it's not save, how to add configuration in array config like :

config.protectedSource.push(/<i[^>]><\/i>/g);
CKEDITOR.dtd.$removeEmpty['i'] = false;
@tonydspaniard
Copy link
Member

I know that protectedSource could be configured on initialization but I do not know about dtd. Have you tried registering the javascript on load at the end of the document and after the widget has been initialized?

@aminkt
Copy link

aminkt commented Apr 8, 2018

No answer???

@kimhongn89
Copy link

kimhongn89 commented Mar 22, 2019

Just add below code
$script = '
CKEDITOR.dtd.$removeEmpty["i"] = false;
';
$this->registerJs($script, View::POS_END);

@tonydspaniard
Copy link
Member

Thanks @kimhongn89

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants