简体   繁体   中英

CKEditor changes blockquote to p

CKEditor changes blockquote to p

I enter this, in the "source view mode":

<blockquote>asdf</blockquote>

After toggling "Source" off and on again, the blockquote was changed to a p :

<p>asdf</p>

This happens in my installation, and on this demo site, too: http://ckeditor.com/demo#widgets

It does not happen in the standard demo: http://ckeditor.com/demo#standard

Why does blockquote get changed?

Because of Advanced Content Filter - there is no feature that would allow <blockquote> support in these editor configurations, so ACF removes these elements.

You need to either add the Blockquote plugin to support this feature or extend your ACF configuration to accept <blockquote> elements.

For example:

config.extraAllowedContent = 'blockquote';

Note that if you want to also support classes, attributes or inline styles for these additional elements, your configuration needs to include them, too.

Check these SDK demos, too:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM