|
| 1 | +customColorPalette = [ |
| 2 | + {"color": "hsl(4, 90%, 58%)", "label": "Red"}, |
| 3 | + {"color": "hsl(340, 82%, 52%)", "label": "Pink"}, |
| 4 | + {"color": "hsl(291, 64%, 42%)", "label": "Purple"}, |
| 5 | + {"color": "hsl(262, 52%, 47%)", "label": "Deep Purple"}, |
| 6 | + {"color": "hsl(231, 48%, 48%)", "label": "Indigo"}, |
| 7 | + {"color": "hsl(207, 90%, 54%)", "label": "Blue"}, |
| 8 | +] |
| 9 | + |
| 10 | +CKEDITOR_5_CONFIGS = { |
| 11 | + "default": { |
| 12 | + "toolbar": [ |
| 13 | + "heading", |
| 14 | + "|", |
| 15 | + "bold", |
| 16 | + "italic", |
| 17 | + "link", |
| 18 | + "bulletedList", |
| 19 | + "numberedList", |
| 20 | + "blockQuote", |
| 21 | + "imageUpload", |
| 22 | + ], |
| 23 | + }, |
| 24 | + "extends": { |
| 25 | + "blockToolbar": [ |
| 26 | + "paragraph", |
| 27 | + "heading1", |
| 28 | + "heading2", |
| 29 | + "heading3", |
| 30 | + "|", |
| 31 | + "bulletedList", |
| 32 | + "numberedList", |
| 33 | + "|", |
| 34 | + "blockQuote", |
| 35 | + ], |
| 36 | + "toolbar": [ |
| 37 | + "heading", |
| 38 | + "|", |
| 39 | + "outdent", |
| 40 | + "indent", |
| 41 | + "|", |
| 42 | + "bold", |
| 43 | + "italic", |
| 44 | + "link", |
| 45 | + "underline", |
| 46 | + "strikethrough", |
| 47 | + "code", |
| 48 | + "subscript", |
| 49 | + "superscript", |
| 50 | + "highlight", |
| 51 | + "|", |
| 52 | + "codeBlock", |
| 53 | + "sourceEditing", |
| 54 | + "insertImage", |
| 55 | + "bulletedList", |
| 56 | + "numberedList", |
| 57 | + "todoList", |
| 58 | + "|", |
| 59 | + "blockQuote", |
| 60 | + "imageUpload", |
| 61 | + "|", |
| 62 | + "fontSize", |
| 63 | + "fontFamily", |
| 64 | + "fontColor", |
| 65 | + "fontBackgroundColor", |
| 66 | + "mediaEmbed", |
| 67 | + "removeFormat", |
| 68 | + "insertTable", |
| 69 | + ], |
| 70 | + "image": { |
| 71 | + "toolbar": [ |
| 72 | + "imageTextAlternative", |
| 73 | + "|", |
| 74 | + "imageStyle:alignLeft", |
| 75 | + "imageStyle:alignRight", |
| 76 | + "imageStyle:alignCenter", |
| 77 | + "imageStyle:side", |
| 78 | + "|", |
| 79 | + ], |
| 80 | + "styles": [ |
| 81 | + "full", |
| 82 | + "side", |
| 83 | + "alignLeft", |
| 84 | + "alignRight", |
| 85 | + "alignCenter", |
| 86 | + ], |
| 87 | + }, |
| 88 | + "table": { |
| 89 | + "contentToolbar": [ |
| 90 | + "tableColumn", |
| 91 | + "tableRow", |
| 92 | + "mergeTableCells", |
| 93 | + "tableProperties", |
| 94 | + "tableCellProperties", |
| 95 | + ], |
| 96 | + "tableProperties": { |
| 97 | + "borderColors": customColorPalette, |
| 98 | + "backgroundColors": customColorPalette, |
| 99 | + }, |
| 100 | + "tableCellProperties": { |
| 101 | + "borderColors": customColorPalette, |
| 102 | + "backgroundColors": customColorPalette, |
| 103 | + }, |
| 104 | + }, |
| 105 | + "heading": { |
| 106 | + "options": [ |
| 107 | + { |
| 108 | + "model": "paragraph", |
| 109 | + "title": "Paragraph", |
| 110 | + "class": "ck-heading_paragraph", |
| 111 | + }, |
| 112 | + { |
| 113 | + "model": "heading1", |
| 114 | + "view": "h1", |
| 115 | + "title": "Heading 1", |
| 116 | + "class": "ck-heading_heading1", |
| 117 | + }, |
| 118 | + { |
| 119 | + "model": "heading2", |
| 120 | + "view": "h2", |
| 121 | + "title": "Heading 2", |
| 122 | + "class": "ck-heading_heading2", |
| 123 | + }, |
| 124 | + { |
| 125 | + "model": "heading3", |
| 126 | + "view": "h3", |
| 127 | + "title": "Heading 3", |
| 128 | + "class": "ck-heading_heading3", |
| 129 | + }, |
| 130 | + ] |
| 131 | + }, |
| 132 | + }, |
| 133 | + "list": { |
| 134 | + "properties": { |
| 135 | + "styles": "true", |
| 136 | + "startIndex": "true", |
| 137 | + "reversed": "true", |
| 138 | + } |
| 139 | + }, |
| 140 | +} |
0 commit comments