如何将样式应用到 Kentico 13 (v13.0.124) 中的 Froala 编辑器?
我尝试将
useClasses
设置为 false 并确认正在使用新配置,但没有任何乐趣。
Kentico 中有一个设置(
CSS stylesheet for WYSIWYG editor
),但似乎仅适用于 CkEditor。
谢谢,
罗里
我创建了一个 RichTextEditorConfiguration.js,如下所示:
(function (pageBuilder) {
var richTextEditor = pageBuilder.richTextEditor = pageBuilder.richTextEditor || {};
var configurations = richTextEditor.configurations = richTextEditor.configurations || {};
// Overrides the "default" configuration of the Rich text widget, assuming you have not specified a different configuration
// The below configuration adds the h5 and h6 values to the paragraphFormat and removes the code value. Also sets the toolbar to be visible without selecting any text.
configurations["default"] = {
toolbarVisibleWithoutSelection: true,
toolbarButtons: ['bold', 'italic', 'underline', 'inlineClass', 'clearFormatting', '|', 'paragraphFormat', 'align', 'formatOL', 'formatUL', '|', 'insertLink', '|', 'html'],
paragraphFormat: {
N: "Normal",
H1: "Headline 1",
H2: "Headline 2",
H3: "Headline 3",
H4: "Headline 4",
H5: "Headline 5",
H6: "Headline 6",
SMALL: "Small",
BIG: "Big"
},
htmlRemoveTags: ['style'],
htmlExecuteScripts: false,
inlineClasses: {
'text-primary': 'Color Primary',
'badge bg-primary': 'Badge Primary'
}
};
// Defines a new configuration for a simple toolbar with only formatting
// options and disables the inline design of the toolbar
configurations["simple"] = {
toolbarButtons: ['paragraphFormat', '|', 'bold', 'italic', 'underline', '|', 'align', 'formatOL', 'formatUL'],
paragraphFormatSelection: true,
toolbarInline: false
};
})(window.kentico.pageBuilder);