From: Mischa POSLAWSKY Date: Tue, 7 Aug 2018 21:08:14 +0000 (+0200) Subject: edit/page: enable styles selection of common classes X-Git-Tag: v3.7~23 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/2ac61542b2b7be587b9b5d0bc6b84a385b38914a edit/page: enable styles selection of common classes Currently the only viable way in ckeditor to use cumulative or inline elements, notably: small, .right, .warn, aside. --- diff --git a/edit/page.js b/edit/page.js index eeef762..c89c13e 100644 --- a/edit/page.js +++ b/edit/page.js @@ -95,14 +95,22 @@ CKEDITOR.on('instanceCreated', function (event) { config.image2_alignClasses = ['left', 'center', 'right']; config.image2_disableResizer = true; config.stylesSet = [ + { name: 'Klein', element: 'small' }, + { name: 'Zijkant', element: 'span', attributes: { 'class': 'right' } }, + { name: 'Attributie', element: 'em', attributes: { 'class': 'right' } }, + { name: 'Quote', element: 'q' }, + { name: 'Gemarkeerd', element: 'span', styles: { 'background-color': 'Yellow' } }, + + { name: 'Kadertekst', element: 'aside' }, + { name: 'Uitgelijnd', element: 'div', attributes: { 'class': 'right' } }, { name: 'Kolom', element: 'div', attributes: { 'class': 'col' } }, - { name: 'Rechts', element: 'div', attributes: { 'class': 'right' } }, + { name: 'Waarschuwing', element: 'div', attributes: { 'class': 'warn' } }, ]; config.pasteFilter = pastefilter; config.contentsCss = document.styleSheets[0].href; config.toolbar = [ ['Inlinesave', '-', 'Undo', 'Redo'], - ['Format'], + ['Format', 'Styles'], ['Bold', 'Italic', 'Link'], ['BulletedList', 'NumberedList', 'Blockquote'], ['Table', 'CreateDiv'],