From: Mischa POSLAWSKY Date: Wed, 16 Dec 2020 12:54:24 +0000 (+0100) Subject: edit/page: replace format selection by style options X-Git-Tag: v5.0~8 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/6adf9d299fe0f6079b1caab7bc461d59ca4898ca edit/page: replace format selection by style options Save one button (fitting in 2 rows on 420px width) by getting rid of the arbitrary distinction between formatting and styles, the latter having equally semantic elements and capable of toggling headers. --- diff --git a/edit/page.js b/edit/page.js index b21a038..f927c1f 100644 --- a/edit/page.js +++ b/edit/page.js @@ -115,7 +115,6 @@ CKEDITOR.on('instanceCreated', function (event) { var config = editor.config; config.language = 'nl'; config.extraPlugins = 'inlinesave,placeholder,image2,uploadimage'; - config.format_tags = 'h2;h3;h4;p'; config.allowedContent = true; config.entities = false; // keep unicode config.filebrowserImageUploadUrl = '/edit/page?output=ckescript'; @@ -123,6 +122,10 @@ CKEDITOR.on('instanceCreated', function (event) { config.image2_alignClasses = ['left', 'center', 'right']; config.image2_disableResizer = true; config.stylesSet = [ + { name: 'Paginakop', element: 'h2' }, + { name: 'Paragraafkop', element: 'h3' }, + { name: 'Alineakop', element: 'h4' }, + { name: 'Gerelateerd', element: 'aside' }, { name: 'Voetnoot', element: 'div', attributes: { 'class': 'right' } }, { name: 'Kolom', element: 'div', attributes: { 'class': 'col' } }, @@ -142,8 +145,7 @@ CKEDITOR.on('instanceCreated', function (event) { config.contentsCss = document.styleSheets[0].href; config.toolbar = [ ['Inlinesave', '-', 'Undo', 'Redo'], - ['Format', 'Styles'], - ['Bold', 'Italic', 'Link'], + ['Styles', 'Bold', 'Italic', 'Link'], ['BulletedList', 'NumberedList', 'Blockquote'], ['Table', 'CreateDiv'], ['Image', 'HorizontalRule', 'CreatePlaceholder'],