5
在我的Ckeditor配置我有一個自定義allowedContent。我不使用allowedContent:true
,因爲我不想讓在span標籤的style屬性Ckeditor:stylesSet不工作,當我設置一個自定義allowedContent
所以這是我allowedContent
allowedContent : 'span[class]; a[!href](*); caption; div; em; h1; h2; h3; h4; h5; h6; hr; i; img; li; ol; p[*]{*}; pre; strong; sub; sup; table; thead; tbody; tfoot; td; th; tr; tt; u; ul; dl; dt; dd; iframe;'
利用這種結構,樣式屬性不再被允許的跨度標籤
問題是與我stylesSets:
stylesSet:
- { name: "style 1", element: ['div', 'p', 'a', 'span'], attributes: { class:"display_only_in_popup" } }
- { name: "style 2", element: ['div', 'p', 'a', 'span'], attributes: { class:"blockquote" } }
- { name: "style 3", element: ['div', 'p', 'a', 'span'], attributes: { class:"note" } }
- { name: "style 4", element: ['p', 'span'], attributes: { class:"highlight" } }
- { name: "style 5", element: 'span', attributes: { class:"visuallyhidden" } }
之前,當我有allowedContent:true
,我能夠看到和使用我所有的5個樣式集,但現在,由於某種原因,我只看到樣式字段中的「樣式5」
是否可以保留我的5個樣式集而不使用allowedContent:true
?
非常感謝
我將'allowedContent'設置爲其默認值,並將其改爲'extraAllowedContent' – Wizard