对于我的 cms,我想使用引导样式编辑内容。当我在 ckeditor 中编辑源代码并添加类属性时,它会通过切换到所见即所得模式而被剥离。
<p class="lead">bla</p> => <p>bla</p>
从文档中,我找不到允许对 p-tags 具有任何值的类属性的方法。
我的配置非常默认:
CKEDITOR.editorConfig = (config) ->
config.language = 'de'
config.contentsCss = '/assets/front/application.css'
config.format_div = { element : 'div', attributes : {'data-no-turbolink' : 'true'}}
config.toolbar_Pure = [
{ name: 'document', items: [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items: [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items: [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks','-','About' ] }
'/',
{ name: 'basicstyles', items: [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items: [ 'Link','Unlink','Anchor' ] },
'/',
{ name: 'styles', items: [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items: [ 'TextColor','BGColor' ] },
{ name: 'insert', items: [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
]
config.toolbar = 'Pure'
true