Skip to content

Instantly share code, notes, and snippets.

@cedeber
Created May 1, 2017 22:00
Show Gist options
  • Save cedeber/4264f3e554b4ff5620300c65dca6a910 to your computer and use it in GitHub Desktop.
Save cedeber/4264f3e554b4ff5620300c65dca6a910 to your computer and use it in GitHub Desktop.
CKEditor Configurations
/**
* External plugins added through the server-side FieldFactory are automatically registered.
* Other external plugins (e.g. client-only) may still be registered here (and subsequently added via config.extraPlugins).
*
* e.g. if your plugin resides in src/main/resources/VAADIN/js:
* CKEDITOR.plugins.addExternal("abbr", CKEDITOR.vaadinDirUrl + "js/abbr/");
*/
CKEDITOR.editorConfig = function ( config ) {
// MIRROR info.magnolia.ui.form.field.definition.RichTextFieldDefinition
definition = {
alignment: true,
images: false,
lists: true,
source: false,
tables: false
};
config.extraPlugins = "magnolialink,magnoliaFileBrowser";
config.removePlugins = "elementspath";
config.baseFloatZIndex = 150;
config.resize_enabled = false;
config.format_tags = "h2;h3;p";
config.fillEmptyBlocks = false;
config.toolbar = "Magnolia";
config.toolbar_Magnolia = [
{ name: "basicstyles", items: [ "Bold", "Italic", "SpecialChar" ] },
{ name: "paragraph", items: [ "BulletedList" ] },
{ name: "links", items: [ "Link", "InternalLink", "DamLink", "Unlink" ] },
{ name: "styles", items: [ "Format" ] },
{ name: "clipboard", items: [ "Cut", "Copy", "Paste", "PasteText" ] },
{ name: "undo", items: [ "Undo", "Redo" ] },
{ name: "tools", items: [ "Source" ] },
];
};
/**
* External plugins added through the server-side FieldFactory are automatically registered.
* Other external plugins (e.g. client-only) may still be registered here (and subsequently added via config.extraPlugins).
*
* e.g. if your plugin resides in src/main/resources/VAADIN/js:
* CKEDITOR.plugins.addExternal("abbr", CKEDITOR.vaadinDirUrl + "js/abbr/");
*/
CKEDITOR.editorConfig = function ( config ) {
// MIRROR info.magnolia.ui.form.field.definition.RichTextFieldDefinition
definition = {
alignment: false,
images: false,
lists: false,
source: false,
tables: false
};
config.extraPlugins = "magnolialink,magnoliaFileBrowser";
config.removePlugins = "elementspath";
config.baseFloatZIndex = 150;
config.resize_enabled = false;
config.format_tags = "p";
config.enterMode = CKEDITOR.ENTER_BR;
config.autoParagraph = false;
config.fillEmptyBlocks = false;
config.toolbar = "Magnolia";
config.toolbar_Magnolia = [
{ name: "basicstyles", items: [ "Bold", "Italic", "SpecialChar" ] },
{ name: "links", items: [ "Link", "InternalLink", "DamLink", "Unlink" ] },
{ name: "clipboard", items: [ "Cut", "Copy", "Paste", "PasteText" ] },
{ name: "undo", items: [ "Undo", "Redo" ] }
];
};
/**
* External plugins added through the server-side FieldFactory are automatically registered.
* Other external plugins (e.g. client-only) may still be registered here (and subsequently added via config.extraPlugins).
*
* e.g. if your plugin resides in src/main/resources/VAADIN/js:
* CKEDITOR.plugins.addExternal("abbr", CKEDITOR.vaadinDirUrl + "js/abbr/");
*/
CKEDITOR.editorConfig = function ( config ) {
// MIRROR info.magnolia.ui.form.field.definition.RichTextFieldDefinition
definition = {
alignment: false,
images: false,
lists: false,
source: false,
tables: false
};
config.extraPlugins = "magnolialink,magnoliaFileBrowser";
config.removePlugins = "elementspath";
config.baseFloatZIndex = 150;
config.resize_enabled = false;
config.format_tags = "p";
config.enterMode = CKEDITOR.ENTER_BR;
config.autoParagraph = false;
config.fillEmptyBlocks = false;
config.colorButton_colors = "BADA55,FA113D";
config.colorButton_enableMore = false;
config.toolbar = "Magnolia";
config.toolbar_Magnolia = [
{ name: "basicstyles", items: [ "Bold", "Italic", "SpecialChar" ] },
{ name: "styles", items: [ "TextColor" ] },
{ name: "clipboard", items: [ "Cut", "Copy", "Paste", "PasteText" ] },
{ name: "undo", items: [ "Undo", "Redo" ] }
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment