Reputation: 111
I have a custom build with both CkEditor Classic and Inline, using GHS to filter some tags on the classic editor works as expected but on the inline editor tags like <a>
(and maybe some other ones too) are pasted in and not filtered
The HTML support config is:
var htmlSupport = {
allow: [{
name: /^(br|em|i|small|sup|sub|u)$/,
classes: false,
styles: false
}]
disallow: [{
name: /[\s\S]+/, // For every HTML feature,
attributes: {
key: /^contenteditable$/
}
}]
};
I have tried to set individual tags on allow rather than a regex and to set the tag on the disallow list too
Upvotes: 1
Views: 646
Reputation: 23
you can try using superbuild package it contains all the necessary packages required for that.
<script src="https://cdn.ckeditor.com/ckeditor5/41.2.1/super-build/ckeditor.js"></script>
use below toolbar config
toolbar: { items: [ 'sourceEditing' ], shouldNotGroupWhenFull: true }, sourceEditing: { allowCollaborationFeatures: true },
Upvotes: 0