Create a new block, add html

<div class="teaser-btn">
<a class="teaser-buy" href="#"></a>
<a class="teaser-readmore" href="#"></a>
</div>

Switch to WYSIWYG HTML editor and back to code and see this

<div class="teaser-btn">&nbsp;</div>

I'm added config.allowedContent = true; in settings but problem remains.

Why works filter on Full HTML format?

Comments

jcisio’s picture

I think it is the default library behavior to remove "empty" element. Check it at http://ckeditor.com/demo

Photoshopper’s picture

http://ckeditor.com/demo remove too.

I would like to turn this off.

wwwpro’s picture

I haven't found how to turn it off, but I have found that adding &nbsp; will prevent the tags from being removed.

So, your code would look like this...

<div class="teaser-btn">
<a class="teaser-buy" href="#">&nbsp;</a>
<a class="teaser-readmore" href="#">&nbsp;</a>
</div>
Photoshopper’s picture

Thanks, I'm knew it

euskarez’s picture

I've the same problem with input tag and I can't insert   because input tags haven't open and close tag.
someone can help me?
thanks!

rajesh.vishwakarma’s picture

Issue summary: View changes

CKEditor remove this for empty html tags. So Create a new format for this.
Go to admin/config/content/formats/add and add new format.
Note: Don't enable any checkbox in Enabled filters section. You can enable PHP evaluator if necessary.

TaraRowell’s picture

Add this setting under the Advanced tab and in the Custom Javascript configuration on the Full HTML format at admin/config/content/ckeditor/edit/Full:

config.allowedContent = true;

kruser’s picture

I would also add...
config.extraAllowedContent = '*(*)';

MediaFormat’s picture

config.allowedContent = true;

+1

knalstaaf’s picture

None of the above is working. This should at least be configurable.

This behaviour is making the use of empty anchors unworkable. This is also frustrating for people using features like Font Awesome and Bootstrap Glyphs (using spaces makes icons look bloated).

kenorb’s picture

Assigned: Photoshopper » Unassigned