Issue #3231364 by Wim Leers, lauriii, bnjmnm, webchick, xjm, tim.plunkett, larowlan, Luke.Leber, catch, effulgentsia, longwave, gabesullice, caldenjacobs, Reinmar, anand.toshniwal93, Shoshana Mayden, zrpnr, yash.rode, nod_, rkoller, antojose, johnwebdev: Add CKEditor 5 module to Drupal core
parent
ec87fa9bf8
commit
35972c9195
|
@ -535,7 +535,7 @@
|
|||
"dist": {
|
||||
"type": "path",
|
||||
"url": "core",
|
||||
"reference": "f3d27c6d13a1d3b6b5e3f2bf2074f63d24c17603"
|
||||
"reference": "1349b63771ae6c0b66e9d870c692bf7f51024171"
|
||||
},
|
||||
"require": {
|
||||
"asm89/stack-cors": "^1.1",
|
||||
|
@ -599,6 +599,7 @@
|
|||
"drupal/book": "self.version",
|
||||
"drupal/breakpoint": "self.version",
|
||||
"drupal/ckeditor": "self.version",
|
||||
"drupal/ckeditor5": "self.version",
|
||||
"drupal/claro": "self.version",
|
||||
"drupal/classy": "self.version",
|
||||
"drupal/color": "self.version",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"**/LICENSE.txt",
|
||||
"../**/LICENSE.txt",
|
||||
"modules/**/Migrate*Test.php",
|
||||
"modules/ckeditor5/js/build/*",
|
||||
"modules/color/preview.html",
|
||||
"modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html",
|
||||
"modules/media/tests/fixtures/oembed/*",
|
||||
|
|
|
@ -3,6 +3,7 @@ node_modules/**/*
|
|||
**/js_test_files/**/*
|
||||
*.js
|
||||
!*.es6.js
|
||||
!modules/ckeditor5/js/ckeditor5_plugins/**/*.js
|
||||
modules/locale/tests/locale_test.es6.js
|
||||
!tests/Drupal/Nightwatch/**/*.js
|
||||
misc/polyfills/array.find.es6.js
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md.
|
||||
*/
|
||||
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.essentials=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(t,e){t.exports=CKEditor5.dll},function(t,e,r){t.exports=r(0)("./src/enter.js")},function(t,e,r){t.exports=r(0)("./src/core.js")},function(t,e,r){t.exports=r(0)("./src/clipboard.js")},function(t,e,r){t.exports=r(0)("./src/select-all.js")},function(t,e,r){t.exports=r(0)("./src/typing.js")},function(t,e,r){t.exports=r(0)("./src/undo.js")},function(t,e,r){"use strict";r.r(e),r.d(e,"Essentials",(function(){return l}));var n=r(2),o=r(3),i=r(1),u=r(4),s=r(5),c=r(6);class l extends n.Plugin{static get requires(){return[o.Clipboard,i.Enter,u.SelectAll,i.ShiftEnter,s.Typing,c.Undo]}static get pluginName(){return"Essentials"}}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md.
|
||||
*/
|
||||
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Remove Format":"Remove Format"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window.CKEditor5=window.CKEditor5||{},window.CKEditor5.removeFormat=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=4)}([function(t,e,o){t.exports=o(1)("./src/core.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,o){t.exports=o(1)("./src/utils.js")},function(t,e,o){t.exports=o(1)("./src/ui.js")},function(t,e,o){"use strict";o.r(e),o.d(e,"RemoveFormat",(function(){return u})),o.d(e,"RemoveFormatEditing",(function(){return a})),o.d(e,"RemoveFormatUI",(function(){return i}));var n=o(0),r=o(3);class i extends n.Plugin{static get pluginName(){return"RemoveFormatUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("removeFormat",o=>{const n=t.commands.get("removeFormat"),i=new r.ButtonView(o);return i.set({label:e("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(i,"execute",()=>{t.execute("removeFormat"),t.editing.view.focus()}),i})}}var s=o(2);class c extends n.Command{refresh(){const t=this.editor.model;this.isEnabled=!!Object(s.first)(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model,e=t.schema;t.change(o=>{for(const n of this._getFormattingItems(t.document.selection,e))if(n.is("selection"))for(const t of this._getFormattingAttributes(n,e))o.removeSelectionAttribute(t);else{const t=o.createRangeOn(n);for(const r of this._getFormattingAttributes(n,e))o.removeAttribute(r,t)}})}*_getFormattingItems(t,e){const o=t=>!!Object(s.first)(this._getFormattingAttributes(t,e));for(const n of t.getRanges())for(const t of n.getItems())!e.isBlock(t)&&o(t)&&(yield t);for(const e of t.getSelectedBlocks())o(e)&&(yield e);o(t)&&(yield t)}*_getFormattingAttributes(t,e){for(const[o]of t.getAttributes()){const t=e.getAttributeProperties(o);t&&t.isFormatting&&(yield o)}}}class a extends n.Plugin{static get pluginName(){return"RemoveFormatEditing"}init(){const t=this.editor;t.commands.add("removeFormat",new c(t))}}class u extends n.Plugin{static get requires(){return[a,i]}static get pluginName(){return"RemoveFormat"}}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(n){const i=n.af=n.af||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Belyn in die middel","Align left":"Belyn links","Align right":"Belyn regs",Justify:"Belyn beide kante","Text alignment":"Teksbelyning","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const r=e.af=e.af||{};r.dictionary=Object.assign(r.dictionary||{},{Bold:"Vetgedruk",Code:"Kode",Italic:"Skuinsgedruk",Strikethrough:"Deurgetrek",Subscript:"Onderskrif",Superscript:"Boskrif",Underline:"Onderstreep"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.af=n.af||{};i.dictionary=Object.assign(i.dictionary||{},{"Block quote":"Blok-aanhaling"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.af=i.af||{};n.dictionary=Object.assign(n.dictionary||{},{"Remove Format":"Verwyder formatering"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.af=e.af||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Cancel:"Kanselleer","Remove color":"","Restore default":"",Save:"Berg","Show more items":""}),o.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const t=i.ast=i.ast||{};t.dictionary=Object.assign(t.dictionary||{},{Bold:"Negrina",Code:"",Italic:"Cursiva",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const a=e.ast=e.ast||{};a.dictionary=Object.assign(a.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"","Enter image caption":"","Full size image":"Imaxen a tamañu completu","Image resize list":"","Image toolbar":"","image widget":"complementu d'imaxen","In line":"",Insert:"","Insert image":"","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"Imaxen llateral","Text alternative":"",Update:"","Update image URL":"","Upload failed":"","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.ast=n.ast||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"",Link:"Enllazar","Link image":"","Link URL":"URL del enllaz","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"Desenllazar"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const t=e.ast=e.ast||{};t.dictionary=Object.assign(t.dictionary||{},{"Bulleted List":"Llista con viñetes","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"Llista numberada","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const r=e.ast=e.ast||{};r.dictionary=Object.assign(r.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"Encaboxar","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Refacer","Remove color":"","Restore default":"","Rich Text Editor":"Editor de testu arriquecíu","Rich Text Editor, %0":"Editor de testu arriquecíu, %0",Save:"Guardar","Show more items":"",Turquoise:"",Undo:"Desfacer",White:"",Yellow:""}),r.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.ca=i.ca||{};n.dictionary=Object.assign(n.dictionary||{},{"Align center":"Alineació centre","Align left":"Alineació esquerra","Align right":"Alineació dreta",Justify:"Justificar","Text alignment":"Alineació text","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const t=i.ca=i.ca||{};t.dictionary=Object.assign(t.dictionary||{},{Bold:"Negreta",Code:"Codi",Italic:"Cursiva",Strikethrough:"Marcat",Subscript:"",Superscript:"",Underline:"Subrallat"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(c){const i=c.ca=c.ca||{};i.dictionary=Object.assign(i.dictionary||{},{"Block quote":"Cita de bloc"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(a){const e=a.ca=a.ca||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"Escull capçalera",Heading:"Capçalera","Heading 1":"Capçalera 1","Heading 2":"Capçalera 2","Heading 3":"Capçalera 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"Pàrraf","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(o){const e=o.ca=o.ca||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"",Cancel:"Cancel·lar","Remove color":"","Restore default":"",Save:"Desar","Show more items":""}),e.getPluralForm=function(o){return 1!=o}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.el=i.el||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"Έντονη",Code:"",Italic:"Πλάγια",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.el=i.el||{};n.dictionary=Object.assign(n.dictionary||{},{"Block quote":"Περιοχή παράθεσης"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const n=e.el=e.el||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose heading":"Επιλέξτε κεφαλίδα",Heading:"Κεφαλίδα","Heading 1":"Κεφαλίδα 1","Heading 2":"Κεφαλίδα 2","Heading 3":"Κεφαλίδα 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"Παράγραφος","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.el=e.el||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"Αλλαγή εναλλακτικού κείμενου","Enter image caption":"Λεζάντα","Full size image":"Εικόνα πλήρης μεγέθους","Image resize list":"","Image toolbar":"","image widget":"","In line":"",Insert:"","Insert image":"Εισαγωγή εικόνας","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"","Text alternative":"Εναλλακτικό κείμενο",Update:"","Update image URL":"","Upload failed":"","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.el=n.el||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"",Link:"Σύνδεσμος","Link image":"","Link URL":"Διεύθυνση συνδέσμου","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"Αφαίρεση συνδέσμου"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.el=e.el||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"Λίστα κουκκίδων","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"Αριθμημένη λίστα","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.el=e.el||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"Ακύρωση","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Επανάληψη","Remove color":"","Restore default":"","Rich Text Editor":"Επεξεργαστής Πλούσιου Κειμένου","Rich Text Editor, %0":"Επεξεργαστής Πλούσιου Κειμένου, 0%",Save:"Αποθήκευση","Show more items":"",Turquoise:"",Undo:"Αναίρεση",White:"",Yellow:""}),o.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const o=i.eo=i.eo||{};o.dictionary=Object.assign(o.dictionary||{},{Bold:"grasa",Code:"",Italic:"kursiva",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(a){const e=a.eo=a.eo||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"Elektu ĉapon",Heading:"Ĉapo","Heading 1":"Ĉapo 1","Heading 2":"Ĉapo 2","Heading 3":"Ĉapo 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"Paragrafo","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.eo=e.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"Ŝanĝu la alternativan tekston de la bildo","Enter image caption":"Skribu klarigon pri la bildo","Full size image":"Bildo kun reala dimensio","Image resize list":"","Image toolbar":"","image widget":"bilda fenestraĵo","In line":"",Insert:"","Insert image":"Enmetu bildon","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"Flanka biildo","Text alternative":"Alternativa teksto",Update:"","Update image URL":"","Upload failed":"","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.eo=i.eo||{};n.dictionary=Object.assign(n.dictionary||{},{Downloadable:"","Edit link":"",Link:"Ligilo","Link image":"","Link URL":"URL de la ligilo","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"Malligi"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.eo=e.eo||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"Bula Listo","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"Numerita Listo","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.eo=e.eo||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"Nuligi","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Refari","Remove color":"","Restore default":"","Rich Text Editor":"Redaktilo de Riĉa Teksto","Rich Text Editor, %0":"Redaktilo de Riĉa Teksto, %0",Save:"Konservi","Show more items":"",Turquoise:"",Undo:"Malfari",White:"",Yellow:""}),o.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.eu=i.eu||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"Lodia",Code:"Kodea",Italic:"Etzana",Strikethrough:"",Subscript:"",Superscript:"",Underline:"Azpimarra"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.eu=i.eu||{};n.dictionary=Object.assign(n.dictionary||{},{"Block quote":"Aipua"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(a){const e=a.eu=a.eu||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"Aukeratu izenburua",Heading:"Izenburua","Heading 1":"Izenburua 1","Heading 2":"Izenburua 2","Heading 3":"Izenburua 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"Paragrafoa","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const a=e.eu=e.eu||{};a.dictionary=Object.assign(a.dictionary||{},{"Break text":"","Centered image":"Zentratutako irudia","Change image text alternative":"Aldatu irudiaren ordezko testua","Enter image caption":"Sartu irudiaren epigrafea","Full size image":"Tamaina osoko irudia","Image resize list":"","Image toolbar":"","image widget":"irudi widgeta","In line":"",Insert:"","Insert image":"Txertatu irudia","Insert image via URL":"","Left aligned image":"Ezkerrean lerrokatutako irudia",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"Eskuinean lerrokatutako irudia","Side image":"Alboko irudia","Text alternative":"Ordezko testua",Update:"","Update image URL":"","Upload failed":"Kargatzeak huts egin du","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.eu=n.eu||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"",Link:"Esteka","Link image":"","Link URL":"Estekaren URLa","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"Desestekatu"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.eu=e.eu||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"Buletdun zerrenda","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"Zenbakidun zerrenda","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const r=e.eu=e.eu||{};r.dictionary=Object.assign(r.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"Utzi","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Berregin","Remove color":"","Restore default":"","Rich Text Editor":"Testu aberastuaren editorea","Rich Text Editor, %0":"Testu aberastuaren editorea, %0",Save:"Gorde","Show more items":"",Turquoise:"",Undo:"Desegin",White:"",Yellow:""}),r.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.gu=i.gu||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"ઘાટુ - બોલ્ડ્",Code:"",Italic:"ત્રાંસુ - ઇટલિક્",Strikethrough:"",Subscript:"",Superscript:"",Underline:"નીચે લિટી - અન્ડરલાઇન્"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.gu=i.gu||{};n.dictionary=Object.assign(n.dictionary||{},{"Block quote":" વિચાર ટાંકો"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@ -0,0 +1 @@
|
|||
!function(n){const i=n.he=n.he||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"יישור באמצע","Align left":"יישור לשמאל","Align right":"יישור לימין",Justify:"מרכוז גבולות","Text alignment":"יישור טקסט","Text alignment toolbar":"סרגל כלים יישור טקסט"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.he=i.he||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"מודגש",Code:"קוד",Italic:"נטוי",Strikethrough:"קו חוצה",Subscript:"כתב תחתי",Superscript:"כתב עילי",Underline:"קו תחתון"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.he=i.he||{};n.dictionary=Object.assign(n.dictionary||{},{"Block quote":"בלוק ציטוט"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const n=e.he=e.he||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose heading":"בחר סוג כותרת",Heading:"כותרת","Heading 1":"כותרת 1","Heading 2":"כותרת 2","Heading 3":"כותרת 3","Heading 4":"כותרת 4","Heading 5":"כותרת 5","Heading 6":"כותרת 6",Paragraph:"פיסקה","Type or paste your content here.":"הזן או הדבק את התוכן כאן","Type your title":"הזן כותרת"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.he=i.he||{};n.dictionary=Object.assign(n.dictionary||{},{"Horizontal line":"קו אופקי"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.he=e.he||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"תמונה ממרוכזת","Change image text alternative":"שינוי טקסט אלטרנטיבי לתמונה","Enter image caption":"הזן כותרת תמונה","Full size image":"תמונה בפריסה מלאה","Image resize list":"","Image toolbar":"סרגל תמונה","image widget":"תמונה","In line":"",Insert:"","Insert image":"הוספת תמונה","Insert image via URL":"","Left aligned image":"תמונה מיושרת לשמאל",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"תמונה מיושרת לימין","Side image":"תמונת צד","Text alternative":"טקסט אלטרנטיבי",Update:"","Update image URL":"","Upload failed":"העלאה נכשלה","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.he=n.he||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"עריכת קישור",Link:"קישור","Link image":"","Link URL":"קישור כתובת אתר","Open in a new tab":"","Open link in new tab":"פתח קישור בכרטיסייה חדשה","This link has no URL":"לקישור זה אין כתובת אתר",Unlink:"ביטול קישור"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.he=e.he||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"רשימה מנוקדת","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"רשימה ממוספרת","Numbered list styles toolbar":"",Square:"","To-do List":"רשימת מטלות","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.he=e.he||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"0% מתוך %1",Aquamarine:"",Black:"",Blue:"",Cancel:"ביטול","Dim grey":"","Dropdown toolbar":"סרגל כלים נפתח","Edit block":"הגדרות בלוק","Editor toolbar":"סרגל הכלים",Green:"",Grey:"","Insert paragraph after block":"","Insert paragraph before block":"","Light blue":"","Light green":"","Light grey":"",Next:"הבא",Orange:"",Previous:"הקודם",Purple:"",Red:"",Redo:"ביצוע מחדש","Remove color":"","Restore default":"","Rich Text Editor":"עורך טקסט עשיר","Rich Text Editor, %0":"עורך טקסט עשיר, %0",Save:"שמירה","Show more items":"הצד פריטים נוספים",Turquoise:"",Undo:"ביטול","Upload in progress":"העלאה מתבצעת",White:"","Widget toolbar":"סרגל יישומון",Yellow:""}),o.getPluralForm=function(e){return 1==e&&e%1==0?0:2==e&&e%1==0?1:e%10==0&&e%1==0&&e>10?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(n){const i=n.kk=n.kk||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Ортадан туралау","Align left":"Солға туралау","Align right":"Оңға туралау",Justify:"","Text alignment":"Мәтінді туралау","Text alignment toolbar":"Мәтінді туралау құралдар тақтасы"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@ -0,0 +1 @@
|
|||
!function(n){const i=n.km=n.km||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"តម្រឹមកណ្ដាល","Align left":"តម្រឹមឆ្វេង","Align right":"តម្រឹមស្ដាំ",Justify:"តម្រឹមសងខាង","Text alignment":"ការតម្រឹមអក្សរ","Text alignment toolbar":"របារឧបករណ៍តម្រឹមអក្សរ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.km=i.km||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"ដិត",Code:"កូដ",Italic:"ទ្រេត",Strikethrough:"ឆូតកណ្ដាល",Subscript:"អក្សរតូចក្រោម",Superscript:"អក្សរតូចលើ",Underline:"គូសបន្ទាត់ក្រោម"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.km=i.km||{};n.dictionary=Object.assign(n.dictionary||{},{"Block quote":"ប្លុកពាក្យសម្រង់"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const e=n.km=n.km||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"ជ្រើសរើសក្បាលអត្ថបទ",Heading:"ក្បាលអត្ថបទ","Heading 1":"ក្បាលអត្ថបទ 1","Heading 2":"ក្បាលអត្ថបទ 2","Heading 3":"ក្បាលអត្ថបទ 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"កថាខណ្ឌ","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.km=e.km||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"","Enter image caption":"បញ្ចូលពាក្យពណ៌នារូបភាព","Full size image":"រូបភាពពេញទំហំ","Image resize list":"","Image toolbar":"","image widget":"វិដជិតរូបភាព","In line":"",Insert:"","Insert image":"បញ្ចូលរូបភាព","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"រូបភាពនៅខាង","Text alternative":"",Update:"","Update image URL":"","Upload failed":"អាប់ឡូតមិនបាន","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.km=n.km||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"",Link:"តំណ","Link image":"","Link URL":"URL តំណ","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"ផ្ដាច់តំណ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.km=e.km||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"បញ្ជីជាចំណុច","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"បញ្ជីជាលេខ","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.km=e.km||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"បោះបង់","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"ធ្វើវិញ","Remove color":"","Restore default":"","Rich Text Editor":"កម្មវិធីកែសម្រួលអត្ថបទសម្បូរបែប","Rich Text Editor, %0":"កម្មវិធីកែសម្រួលអត្ថបទសម្បូរបែប, %0",Save:"រក្សាទុ","Show more items":"",Turquoise:"",Undo:"លែងធ្វើវិញ",White:"",Yellow:""}),o.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.kn=i.kn||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"ದಪ್ಪ",Code:"",Italic:"ಇಟಾಲಿಕ್",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.kn=n.kn||{};i.dictionary=Object.assign(i.dictionary||{},{"Block quote":"ಗುರುತಿಸಲಾದ ಉಲ್ಲೇಖ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const e=n.kn=n.kn||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"ಶೀರ್ಷಿಕೆ ಆಯ್ಕೆಮಾಡು",Heading:"ಶೀರ್ಷಿಕೆ","Heading 1":"ಶೀರ್ಷಿಕೆ 1","Heading 2":"ಶೀರ್ಷಿಕೆ 2","Heading 3":"ಶೀರ್ಷಿಕೆ 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"ಪ್ಯಾರಾಗ್ರಾಫ್","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.kn=e.kn||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"ಚಿತ್ರದ ಬದಲಿ ಪಠ್ಯ ಬದಲಾಯಿಸು","Enter image caption":"ಚಿತ್ರದ ಶೀರ್ಷಿಕೆ ಸೇರಿಸು","Full size image":"ಪೂರ್ಣ ಅಳತೆಯ ಚಿತ್ರ","Image resize list":"","Image toolbar":"","image widget":"ಚಿತ್ರ ವಿಜೆಟ್","In line":"",Insert:"","Insert image":"","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"ಪಕ್ಕದ ಚಿತ್ರ","Text alternative":"ಪಠ್ಯದ ಬದಲಿ",Update:"","Update image URL":"","Upload failed":"","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.kn=n.kn||{};i.dictionary=Object.assign(i.dictionary||{},{Downloadable:"","Edit link":"",Link:"ಕೊಂಡಿ","Link image":"","Link URL":"ಕೊಂಡಿ ಸಂಪರ್ಕಿಸು","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"ಕೊಂಡಿ ತೆಗೆ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.kn=e.kn||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"ಬುಲೆಟ್ ಪಟ್ಟಿ","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"ಸಂಖ್ಯೆಯ ಪಟ್ಟಿ","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.kn=e.kn||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"ರದ್ದುಮಾಡು","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"ಮತ್ತೆ ಮಾಡು","Remove color":"","Restore default":"","Rich Text Editor":"ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ","Rich Text Editor, %0":"ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ, %0",Save:"ಉಳಿಸು","Show more items":"",Turquoise:"",Undo:"ರದ್ದು",White:"",Yellow:""}),o.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const c=i.oc=i.oc||{};c.dictionary=Object.assign(c.dictionary||{},{Bold:"Gras",Code:"",Italic:"Italica",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(o){const n=o.oc=o.oc||{};n.dictionary=Object.assign(n.dictionary||{},{"%0 of %1":"",Cancel:"Anullar","Remove color":"","Restore default":"",Save:"Enregistrar","Show more items":""}),n.getPluralForm=function(o){return o>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(t){const n=t.pt=t.pt||{};n.dictionary=Object.assign(n.dictionary||{},{"Align center":"Alinhar ao centro","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita",Justify:"Justificar","Text alignment":"Alinhamento de texto","Text alignment toolbar":"Ferramentas de alinhamento de texto"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const t=i.pt=i.pt||{};t.dictionary=Object.assign(t.dictionary||{},{Bold:"Negrito",Code:"Código",Italic:"Itálico",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(a){const e=a.pt=a.pt||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose heading":"",Heading:"Cabeçalho","Heading 1":"Cabeçalho 1","Heading 2":"Cabeçalho 2","Heading 3":"Cabeçalho 3","Heading 4":"","Heading 5":"","Heading 6":"",Paragraph:"Parágrafo","Type or paste your content here.":"","Type your title":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"Break text":"","Centered image":"Imagem centrada","Change image text alternative":"","Enter image caption":"Indicar legenda da imagem","Full size image":"Imagem em tamanho completo","Image resize list":"","Image toolbar":"","image widget":"módulo de imagem","In line":"",Insert:"","Insert image":"Inserir imagem","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"Imagem lateral","Text alternative":"Texto alternativo",Update:"","Update image URL":"","Upload failed":"Falha ao carregar","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const n=i.pt=i.pt||{};n.dictionary=Object.assign(n.dictionary||{},{Downloadable:"","Edit link":"",Link:"Hiperligação","Link image":"","Link URL":"URL da ligação","Open in a new tab":"","Open link in new tab":"","This link has no URL":"",Unlink:"Desligar"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const t=e.pt=e.pt||{};t.dictionary=Object.assign(t.dictionary||{},{"Bulleted List":"Lista não ordenada","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"Lista ordenada","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.pt=e.pt||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Cancel:"Cancelar","Dim grey":"","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"",Grey:"","Light blue":"","Light green":"","Light grey":"",Next:"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Refazer","Remove color":"","Restore default":"","Rich Text Editor":"Editor de texto avançado","Rich Text Editor, %0":"Editor de texto avançado, %0",Save:"Guardar","Show more items":"",Turquoise:"",Undo:"Desfazer",White:"",Yellow:""}),o.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(i){const n=i.si=i.si||{};n.dictionary=Object.assign(n.dictionary||{},{Bold:"තදකුරු",Code:"",Italic:"ඇලකුරු",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const i=e.si=e.si||{};i.dictionary=Object.assign(i.dictionary||{},{"Break text":"","Centered image":"","Change image text alternative":"","Enter image caption":"","Full size image":"","Image resize list":"","Image toolbar":"","image widget":"","In line":"",Insert:"","Insert image":"පින්තූරය ඇතුල් කරන්න","Insert image via URL":"","Left aligned image":"",Original:"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Right aligned image":"","Side image":"","Text alternative":"",Update:"","Update image URL":"","Upload failed":"උඩුගත කිරීම අසාර්ථක විය","Wrap text":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const l=e.si=e.si||{};l.dictionary=Object.assign(l.dictionary||{},{"Bulleted List":"බුලටිත ලැයිස්තුව","Bulleted list styles toolbar":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Lower-latin":"","Lower–roman":"","Numbered List":"අංකිත ලැයිස්තුව","Numbered list styles toolbar":"",Square:"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"","Upper-latin":"","Upper-roman":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.si=n.si||{};i.dictionary=Object.assign(i.dictionary||{},{Redo:"නැවත කරන්න",Undo:"අහෝසි කරන්න"}),i.getPluralForm=function(n){return 1!=n}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(a){const n=a.sl=a.sl||{};n.dictionary=Object.assign(n.dictionary||{},{"Align center":"Sredinska poravnava","Align left":"Poravnava levo","Align right":"Poravnava desno",Justify:"Postavi na sredino","Text alignment":"Poravnava besedila","Text alignment toolbar":"Orodna vrstica besedila"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(o){const i=o.sl=o.sl||{};i.dictionary=Object.assign(i.dictionary||{},{Bold:"Krepko",Code:"Koda",Italic:"Poševno",Strikethrough:"Prečrtano",Subscript:"Naročnik",Superscript:"Nadpis",Underline:"Podčrtaj"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(i){const o=i.sl=i.sl||{};o.dictionary=Object.assign(o.dictionary||{},{"Block quote":"Blokiraj citat"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(a){const i=a.sl=a.sl||{};i.dictionary=Object.assign(i.dictionary||{},{"Choose heading":"Izberi naslov",Heading:"Naslov","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Paragraph:"Odstavek","Type or paste your content here.":"Vnesi ali prilepi vsebino","Type your title":"Vnesi naslov"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(n){const i=n.sl=n.sl||{};i.dictionary=Object.assign(i.dictionary||{},{"Horizontal line":"Vodoravna črta"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(e){const o=e.sl=e.sl||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Aquamarine:"Akvamarin",Black:"Črna",Blue:"Modra",Cancel:"Prekliči","Dim grey":"Temno siva","Dropdown toolbar":"","Edit block":"","Editor toolbar":"",Green:"Zelena",Grey:"Siva","Light blue":"Svetlo modra","Light green":"Svetlo zelena","Light grey":"Svetlo siva",Next:"",Orange:"Oranžna",Previous:"",Purple:"Vijolična",Red:"Rdeča","Remove color":"Odstrani barvo","Restore default":"","Rich Text Editor":"","Rich Text Editor, %0":"",Save:"Shrani","Show more items":"",Turquoise:"Turkizna",White:"Bela",Yellow:"Rumena"}),o.getPluralForm=function(e){return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
!function(t){const i=t.tt=t.tt||{};i.dictionary=Object.assign(i.dictionary||{},{Bold:"Калын",Code:"Код",Italic:"",Strikethrough:"",Subscript:"",Superscript:"",Underline:""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));!function(o){const t=o.tt=o.tt||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Cancel:"",Redo:"Кабатла","Remove color":"","Restore default":"",Save:"Сакла","Show more items":"",Undo:""}),t.getPluralForm=function(o){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -65,6 +65,7 @@
|
|||
"drupal/book": "self.version",
|
||||
"drupal/breakpoint": "self.version",
|
||||
"drupal/ckeditor": "self.version",
|
||||
"drupal/ckeditor5": "self.version",
|
||||
"drupal/claro": "self.version",
|
||||
"drupal/classy": "self.version",
|
||||
"drupal/color": "self.version",
|
||||
|
|
|
@ -22,6 +22,234 @@ ckeditor:
|
|||
js:
|
||||
assets/vendor/ckeditor/ckeditor.js: { preprocess: false, minified: true }
|
||||
|
||||
ckeditor5:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/ckeditor5-dll.js: { preprocess: false, minified: true }
|
||||
|
||||
ckeditor5.editorClassic:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/editor-classic.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.editorDecoupled:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/editor-decoupled.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
- core/ckeditor5.htmlSupport
|
||||
|
||||
ckeditor5.internal:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/essentials.js: { preprocess: false, minified: true }
|
||||
assets/vendor/ckeditor5/heading.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.basic:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/basic-styles.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.specialCharacters:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/special-characters.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.blockquote:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/block-quote.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.image:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/image.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.link:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/link.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.list:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/list.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.horizontalLine:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/horizontal-line.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.htmlSupport:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/html-support.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.alignment:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/alignment.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.removeFormat:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/remove-format.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.pasteFromOffice:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/paste-from-office.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- ckeditor5/ckeditor5
|
||||
|
||||
ckeditor5.indent:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/indent.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.sourceEditing:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/source-editing.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.table:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/table.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
ckeditor5.language:
|
||||
remote: https://github.com/ckeditor/ckeditor5
|
||||
version: "31.0.0"
|
||||
license:
|
||||
name: GNU-GPL-2.0-or-later
|
||||
url: https://github.com/ckeditor/ckeditor5/blob/v31.0.0/LICENSE.md
|
||||
gpl-compatible: true
|
||||
js:
|
||||
assets/vendor/ckeditor5/language.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
|
||||
css.escape:
|
||||
remote: https://github.com/mathiasbynens/CSS.escape
|
||||
version: "1.5.1"
|
||||
|
|
|
@ -0,0 +1,235 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Documentation related to CKEditor 5.
|
||||
*/
|
||||
|
||||
use Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition;
|
||||
|
||||
/**
|
||||
* @defgroup ckeditor5_architecture CKEditor 5 architecture
|
||||
* @{
|
||||
*
|
||||
* @section overview Overview
|
||||
* The CKEditor 5 module integrates CKEditor 5 with Drupal's filtering and text
|
||||
* editor APIs.
|
||||
*
|
||||
* Where possible, it uses upstream CKEditor plugins, but it also relies on
|
||||
* Drupal-specific CKEditor plugins to ensure a consistent user experience.
|
||||
*
|
||||
* @see https://ckeditor.com/ckeditor-5/
|
||||
*
|
||||
* @section data_models Data models
|
||||
* Drupal and CKEditor 5 have very different data models.
|
||||
*
|
||||
* Drupal stores blobs of HTML that remains manageable thanks to the use of
|
||||
* filters and granular HTML restrictions — crucially this remains manageable
|
||||
* thanks to those restrictions but also because Drupal does not need to
|
||||
* process, render, understand or otherwise interact with it.
|
||||
*
|
||||
* @see \Drupal\text\Plugin\Field\FieldType\TextItemBase
|
||||
* @see \Drupal\filter\Plugin\Filter\FilterInterface::getHTMLRestrictions()
|
||||
*
|
||||
* On the other hand, CKEditor 5 must not only be able to render these
|
||||
* blobs, but also allow editing and creating it. This requires a much deeper
|
||||
* understanding of that HTML.
|
||||
*
|
||||
* CKEditor 5 (in contrast with CKEditor 4) therefore has its own data model to
|
||||
* represent this information — that data model is explicitly not HTML.
|
||||
*
|
||||
* Therefore all interactions between Drupal and CKEditor 5 need to translate
|
||||
* between these different data models.
|
||||
*
|
||||
* @see https://ckeditor.com/docs/ckeditor5/latest/framework/guides/architecture/editing-engine.html#element-types-and-custom-data
|
||||
*
|
||||
* @section plugins CKEditor 5 Plugins
|
||||
* CKEditor 5 plugins may use either YAML or a PHP annotation for their
|
||||
* definitions. A PHP class does not need an annotation if it is defined in yml.
|
||||
*
|
||||
* To be discovered, YAML definition files must be named
|
||||
* {module_name}.ckeditor5.yml.
|
||||
*
|
||||
* @see ckeditor5.ckeditor5.yml for many examples of CKEditor 5 plugin
|
||||
* configuration as YAML.
|
||||
*
|
||||
* The minimally required metadata: the CKEditor 5 plugins to load, the label
|
||||
* and the HTML elements it can generate — here's an example for a module
|
||||
* providing a Marquee plugin, both in yml and Annotation form:
|
||||
*
|
||||
* @code
|
||||
* MODULE_NAME_marquee:
|
||||
* ckeditor5:
|
||||
* plugins: [PACKAGE.CLASS]
|
||||
* drupal:
|
||||
* label: Marquee
|
||||
* elements:
|
||||
* - <marquee>
|
||||
* @endcode
|
||||
*
|
||||
* and
|
||||
*
|
||||
* @code
|
||||
* * @CKEditor5Plugin(
|
||||
* * id = "MODULE_NAME_marquee",
|
||||
* * ckeditor5 = @CKEditor5AspectsOfCKEditor5Plugin(
|
||||
* * plugins = { "PACKAGE.CLASS" },
|
||||
* * ),
|
||||
* * drupal = @DrupalAspectsOfCKEditor5Plugin(
|
||||
* * label = @Translation("Marquee"),
|
||||
* * elements = { "<marquee>" },
|
||||
* * )
|
||||
* * )
|
||||
* @endcode
|
||||
*
|
||||
* The metadata relating strictly to the CKEditor 5 plugin's JS code is stored
|
||||
* in the 'ckeditor5' key; all other metadata is stored in the 'drupal' key.
|
||||
*
|
||||
* If the plugin has a dependency on another module, adding the 'provider' key
|
||||
* will prevent the plugin from being loaded if that module is not installed.
|
||||
*
|
||||
* All of these can be defined in YAML or annotations. A given plugin should
|
||||
* choose one or the other, as a definition can't parse both at once.
|
||||
*
|
||||
* Overview of all available plugin definition properties:
|
||||
*
|
||||
* - provider: Allows a plugin to have a dependency on another module. If it has
|
||||
* a value, a module with a machine name matching that value must be installed
|
||||
* for the configured plugin to load.
|
||||
* - ckeditor5.plugins: A list CKEditor 5 JavaScript plugins to load, as
|
||||
* '{package.Class}' , such as 'drupalMedia.DrupalMedia'.
|
||||
* - ckeditor5.config: A keyed array of additional values for the constructor of
|
||||
* the CKEditor 5 JavaScript plugins being loaded. i.e. this becomes the
|
||||
* CKEditor 5 plugin configuration settings (see
|
||||
* https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/configuration.html)
|
||||
* for a given plugin.
|
||||
* - drupal.label: Human-readable name of the CKEditor 5 plugin.
|
||||
* - drupal.library: A Drupal asset library to load with the plugin.
|
||||
* - drupal.admin_library: A Drupal asset library that will load in the text
|
||||
* format admin UI when the plugin is available.
|
||||
* - drupal.class: Optional PHP class that makes it possible for the plugin to
|
||||
* provide dynamic values, or a configuration UI. The value should be
|
||||
* formatted as '\Drupal\{module_name}\Plugin\CKEditor5Plugin\{class_name}' to
|
||||
* make it discoverable.
|
||||
* - drupal.elements: A list of elements and attributes the plugin allows use of
|
||||
* within CKEditor 5. This uses the same syntax as the 'filter_html' plugin
|
||||
* with an additional special keyword: '<$block>' . Using
|
||||
* '<$block [attribute(s)]>` will permit the provided attributes in all block
|
||||
* level tags that are explicitly enabled in any plugin. i.e. if only '<p>',
|
||||
* '<h3>' and '<h2>' tags are allowed, then '<$block data-something>' will
|
||||
* allow the 'data-something' attribute for '<p>', '<h3>' and '<h2>' tags.
|
||||
* - drupal.toolbar_items: List of toolbar items the plugin provides. Keyed by a
|
||||
* machine name and the value being a pair defining the label:
|
||||
* @code
|
||||
* toolbar_items:
|
||||
* indent:
|
||||
* label: Indent
|
||||
* outdent:
|
||||
* label: Outdent
|
||||
* @encode
|
||||
* - drupal.conditions: Conditions required for the plugin to load (other than
|
||||
* module dependencies, which are defined by the 'provider' property).
|
||||
* Conditions can check for three different things:
|
||||
* - 'toolbarItem': a toolbar item that must be enabled
|
||||
* - 'filter': a filter that must be enabled
|
||||
* - 'imageUploadStatus': TRUE if image upload must be enabled, FALSE if it
|
||||
* must not be enabled
|
||||
* - 'plugins': a list of CKEditor 5 Drupal plugin IDs that must be enabled
|
||||
*
|
||||
* All of these can be defined in YAML or annotations. A given plugin should
|
||||
* choose one or the other, as a definition can't parse both at once.
|
||||
*
|
||||
* @see \Drupal\ckeditor5\Annotation\CKEditor5Plugin
|
||||
* @see \Drupal\ckeditor5\Annotation\CKEditor5AspectsOfCKEditor5Plugin
|
||||
* @see \Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin
|
||||
*
|
||||
* @section upgrade_path Upgrade path
|
||||
*
|
||||
* Modules can provide upgrade paths similar to the built-in upgrade path for
|
||||
* Drupal core's CKEditor 4 to CKEditor 5, by providing a CKEditor4To5Upgrade
|
||||
* plugin. This plugin type allows:
|
||||
* - mapping a CKEditor 4 button to an equivalent CKEditor 5 toolbar item
|
||||
* - mapping CKEditor 4 plugin settings to equivalent CKEditor 5 plugin
|
||||
* configuration.
|
||||
* The supported CKEditor 4 buttons and/or CKEditor 4 plugin settings must be
|
||||
* specified in the annotation.
|
||||
* See Drupal core's implementation for an example.
|
||||
*
|
||||
* @see \Drupal\ckeditor5\Annotation\CKEditor4To5Upgrade
|
||||
* @see \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface
|
||||
* @see \Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Core
|
||||
*
|
||||
* @section public_api Public API
|
||||
*
|
||||
* The CKEditor 5 module provides no public API, other than:
|
||||
* - the annotations and interfaces mentioned above;
|
||||
* - to help implement CKEditor 5 plugins:
|
||||
* \Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableTrait and
|
||||
* \Drupal\ckeditor5\Plugin\CKEditor5PluginDefault;
|
||||
* - \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition, which is used to
|
||||
* interact with plugin definitions in hook_ckeditor5_plugin_info_alter();
|
||||
* - to help contributed modules write tests:
|
||||
* \Drupal\Tests\ckeditor5\Kernel\CKEditor5ValidationTestTrait and
|
||||
* \Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait;
|
||||
* - to help contributed modules write configuration schemas for configurable
|
||||
* plugins, the data types in config/schema/ckeditor5.data_types.yml are
|
||||
* likely to be useful. They automatically get validation constraints applied;
|
||||
* - to help contributed modules write validation constraints for configurable
|
||||
* plugins, it is strongly recommended to subclass
|
||||
* \Drupal\Tests\ckeditor5\Kernel\ValidatorsTest. For very complex validation
|
||||
* constraints that need to access text editor and/or format, use
|
||||
* \Drupal\ckeditor5\Plugin\Validation\Constraint\TextEditorObjectDependentValidatorTrait.
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup hooks
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Modify the list of available CKEditor 5 plugins.
|
||||
*
|
||||
* This hook may be used to modify plugin properties after they have been
|
||||
* specified by other modules.
|
||||
*
|
||||
* @param array $plugin_definitions
|
||||
* An array of all the existing plugin definitions, passed by reference.
|
||||
*
|
||||
* @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager
|
||||
*/
|
||||
function hook_ckeditor5_plugin_info_alter(array &$plugin_definitions): void {
|
||||
assert($plugin_definitions['ckeditor5_link'] instanceof CKEditor5PluginDefinition);
|
||||
$link_plugin_definition = $plugin_definitions['ckeditor5_link']->toArray();
|
||||
$link_plugin_definition['ckeditor5']['config']['link']['decorators'][] = [
|
||||
'mode' => 'manual',
|
||||
'label' => t('Open in new window'),
|
||||
'attributes' => [
|
||||
'target' => '_blank',
|
||||
],
|
||||
];
|
||||
$plugin_definitions['ckeditor5_link'] = new CKEditor5PluginDefinition($link_plugin_definition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the list of available CKEditor 4 to 5 Upgrade plugins.
|
||||
*
|
||||
* This hook may be used to modify plugin properties after they have been
|
||||
* specified by other modules. For example, to override a default upgrade path.
|
||||
*
|
||||
* @param array $plugin_definitions
|
||||
* An array of all the existing plugin definitions, passed by reference.
|
||||
*
|
||||
* @see \Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginManager
|
||||
*/
|
||||
function hook_ckeditor4to5upgrade_plugin_info_alter(array &$plugin_definitions): void {
|
||||
// Remove core's upgrade path for the "Maximize" button (which is: there is no
|
||||
// equivalent). This allows a different CKEditor4To5Upgrade plugin to define
|
||||
// this upgrade path instead.
|
||||
unset($plugin_definitions['core']['cke4_buttons']['Maximize']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup hooks".
|
||||
*/
|
|
@ -0,0 +1,510 @@
|
|||
# CKEditor 5 Drupal plugin definitions.
|
||||
# @see this module's README.md for details on defining CKEditor 5 plugins in
|
||||
# Drupal.
|
||||
|
||||
ckeditor5_essentials:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- drupalHtmlEngine.DrupalHtmlEngine
|
||||
- essentials.Essentials
|
||||
drupal:
|
||||
label: Essentials
|
||||
library: ckeditor5/drupal.ckeditor5.internal
|
||||
admin_library: ckeditor5/admin.internal
|
||||
toolbar_items:
|
||||
undo:
|
||||
label: Undo
|
||||
redo:
|
||||
label: Redo
|
||||
elements:
|
||||
- <br>
|
||||
conditions: []
|
||||
|
||||
ckeditor5_paragraph:
|
||||
ckeditor5:
|
||||
plugins: [paragraph.Paragraph]
|
||||
drupal:
|
||||
label: Paragraph
|
||||
library: core/ckeditor5.internal
|
||||
admin_library: ckeditor5/admin.internal
|
||||
elements:
|
||||
- <p>
|
||||
|
||||
ckeditor5_heading:
|
||||
ckeditor5:
|
||||
plugins: [heading.Heading]
|
||||
config:
|
||||
heading:
|
||||
# These are the options passed to the CKEditor heading constructor
|
||||
# @see https://ckeditor.com/docs/ckeditor5/latest/api/module_heading_heading-HeadingConfig.html#member-options
|
||||
# for details on what each of these config properties do.
|
||||
options:
|
||||
- { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }
|
||||
- { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }
|
||||
- { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
|
||||
- { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
|
||||
- { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }
|
||||
- { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' }
|
||||
- { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' }
|
||||
drupal:
|
||||
label: Headings
|
||||
library: core/ckeditor5.internal
|
||||
admin_library: ckeditor5/admin.heading
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
|
||||
toolbar_items:
|
||||
heading:
|
||||
label: Heading
|
||||
elements:
|
||||
- <h1>
|
||||
- <h2>
|
||||
- <h3>
|
||||
- <h4>
|
||||
- <h5>
|
||||
- <h6>
|
||||
|
||||
ckeditor5_htmlSupport:
|
||||
ckeditor5:
|
||||
plugins: [htmlSupport.GeneralHtmlSupport]
|
||||
config:
|
||||
htmlSupport:
|
||||
allow:
|
||||
-
|
||||
name:
|
||||
regexp:
|
||||
pattern: /.*/
|
||||
attributes: true
|
||||
classes: true
|
||||
styles: true
|
||||
drupal:
|
||||
label: Arbitrary HTML support
|
||||
elements: false
|
||||
library: core/ckeditor5.htmlSupport
|
||||
# @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface::getEnabledDefinitions()
|
||||
conditions: []
|
||||
|
||||
ckeditor5_specialCharacters:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- specialCharacters.SpecialCharacters
|
||||
- specialCharacters.SpecialCharactersEssentials
|
||||
drupal:
|
||||
label: Special characters
|
||||
library: core/ckeditor5.specialCharacters
|
||||
admin_library: ckeditor5/admin.specialCharacters
|
||||
toolbar_items:
|
||||
specialCharacters:
|
||||
label: Special characters
|
||||
elements: false
|
||||
|
||||
ckeditor5_sourceEditing:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- sourceEditing.SourceEditing
|
||||
- htmlSupport.GeneralHtmlSupport
|
||||
drupal:
|
||||
label: Source editing
|
||||
class: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing
|
||||
# This is the only CKEditor 5 plugin allowed to generate a superset of elements.
|
||||
# @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::getElementsSubset()
|
||||
elements: ['<*>']
|
||||
library: core/ckeditor5.sourceEditing
|
||||
admin_library: ckeditor5/admin.sourceEditing
|
||||
toolbar_items:
|
||||
sourceEditing:
|
||||
label: Source
|
||||
|
||||
ckeditor5_bold:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Bold]
|
||||
drupal:
|
||||
label: Bold
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
bold:
|
||||
label: Bold
|
||||
elements:
|
||||
- <strong>
|
||||
|
||||
ckeditor5_emphasis:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- basicStyles.Italic
|
||||
- drupalEmphasis.DrupalEmphasis
|
||||
drupal:
|
||||
label: Emphasis
|
||||
library: ckeditor5/drupal.ckeditor5.emphasis
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
italic:
|
||||
label: Italic
|
||||
elements:
|
||||
- <em>
|
||||
|
||||
ckeditor5_underline:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Underline]
|
||||
drupal:
|
||||
label: Underline
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
underline:
|
||||
label: Underline
|
||||
elements:
|
||||
- <u>
|
||||
|
||||
ckeditor5_code:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Code]
|
||||
drupal:
|
||||
label: Code
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
code:
|
||||
label: Code
|
||||
elements:
|
||||
- <code>
|
||||
|
||||
ckeditor5_strikethrough:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Strikethrough]
|
||||
drupal:
|
||||
label: Strikethrough
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
strikethrough:
|
||||
label: Strikethrough
|
||||
elements:
|
||||
- <s>
|
||||
|
||||
ckeditor5_subscript:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Subscript]
|
||||
drupal:
|
||||
label: Subscript
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
subscript:
|
||||
label: Subscript
|
||||
elements:
|
||||
- <sub>
|
||||
|
||||
ckeditor5_superscript:
|
||||
ckeditor5:
|
||||
plugins: [basicStyles.Superscript]
|
||||
drupal:
|
||||
label: Superscript
|
||||
library: core/ckeditor5.basic
|
||||
admin_library: ckeditor5/admin.basic
|
||||
toolbar_items:
|
||||
superscript:
|
||||
label: Superscript
|
||||
elements:
|
||||
- <sup>
|
||||
|
||||
ckeditor5_blockquote:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- blockQuote.BlockQuote
|
||||
drupal:
|
||||
label: Block quote
|
||||
library: core/ckeditor5.blockquote
|
||||
admin_library: ckeditor5/admin.blockquote
|
||||
toolbar_items:
|
||||
blockQuote:
|
||||
label: Block quote
|
||||
elements:
|
||||
- <blockquote>
|
||||
|
||||
ckeditor5_link:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- link.Link
|
||||
drupal:
|
||||
label: Link
|
||||
library: core/ckeditor5.link
|
||||
admin_library: ckeditor5/admin.link
|
||||
toolbar_items:
|
||||
link:
|
||||
label: Link
|
||||
elements:
|
||||
- <a href>
|
||||
|
||||
ckeditor5_linkImage:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- link.LinkImage
|
||||
config:
|
||||
# Append the "Link" button to the image balloon toolbar.
|
||||
image:
|
||||
toolbar:
|
||||
- '|'
|
||||
- linkImage
|
||||
drupal:
|
||||
label: Linked Image
|
||||
elements: false
|
||||
conditions:
|
||||
plugins:
|
||||
- ckeditor5_link
|
||||
- ckeditor5_image
|
||||
|
||||
ckeditor5_linkMedia:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- drupalMedia.DrupalLinkMedia
|
||||
config:
|
||||
# Append the "Link" button to the media balloon toolbar.
|
||||
drupalMedia:
|
||||
toolbar: [drupalLinkMedia]
|
||||
drupal:
|
||||
label: Linked Media
|
||||
elements: false
|
||||
conditions:
|
||||
plugins:
|
||||
- ckeditor5_link
|
||||
- media_media
|
||||
|
||||
ckeditor5_list:
|
||||
ckeditor5:
|
||||
plugins: [list.List]
|
||||
drupal:
|
||||
label: List
|
||||
library: core/ckeditor5.list
|
||||
admin_library: ckeditor5/admin.list
|
||||
toolbar_items:
|
||||
bulletedList:
|
||||
label: Bulleted list
|
||||
numberedList:
|
||||
label: Numbered list
|
||||
elements:
|
||||
- <ul>
|
||||
- <ol>
|
||||
- <li>
|
||||
|
||||
ckeditor5_horizontalLine:
|
||||
ckeditor5:
|
||||
plugins: [horizontalLine.HorizontalLine]
|
||||
drupal:
|
||||
label: Horizontal line
|
||||
library: core/ckeditor5.horizontalLine
|
||||
admin_library: ckeditor5/admin.horizontalLine
|
||||
toolbar_items:
|
||||
horizontalLine:
|
||||
label: Horizontal line
|
||||
elements:
|
||||
- <hr>
|
||||
|
||||
ckeditor5_alignment:
|
||||
ckeditor5:
|
||||
plugins: [alignment.Alignment]
|
||||
config:
|
||||
# @see core/modules/system/css/components/align.module.css
|
||||
alignment:
|
||||
options:
|
||||
- name: left
|
||||
className: text-align-left
|
||||
- name: center
|
||||
className: text-align-center
|
||||
- name: right
|
||||
className: text-align-right
|
||||
- name: justify
|
||||
className: text-align-justify
|
||||
drupal:
|
||||
label: Alignment
|
||||
library: core/ckeditor5.alignment
|
||||
admin_library: ckeditor5/admin.alignment
|
||||
toolbar_items:
|
||||
alignment:
|
||||
label: Text alignment
|
||||
"alignment:left":
|
||||
label: Align left
|
||||
"alignment:center":
|
||||
label: Align center
|
||||
"alignment:right":
|
||||
label: Align right
|
||||
"alignment:justify":
|
||||
label: justify
|
||||
elements:
|
||||
- <$block class="text-align-left text-align-center text-align-right text-align-justify">
|
||||
|
||||
ckeditor5_removeFormat:
|
||||
ckeditor5:
|
||||
plugins: [removeFormat.RemoveFormat]
|
||||
drupal:
|
||||
label: Remove Format
|
||||
library: core/ckeditor5.removeFormat
|
||||
admin_library: ckeditor5/admin.removeFormat
|
||||
toolbar_items:
|
||||
removeFormat:
|
||||
label: Remove Format
|
||||
elements: false
|
||||
|
||||
ckeditor5_pasteFromOffice:
|
||||
ckeditor5:
|
||||
plugins: [pasteFromOffice.PasteFromOffice]
|
||||
drupal:
|
||||
label: Paste From Office
|
||||
library: core/ckeditor5.pasteFromOffice
|
||||
elements: false
|
||||
conditions: []
|
||||
|
||||
ckeditor5_table:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- table.Table
|
||||
- table.TableToolbar
|
||||
config:
|
||||
table:
|
||||
contentToolbar: [tableColumn, tableRow, mergeTableCells]
|
||||
drupal:
|
||||
label: Table
|
||||
library: core/ckeditor5.table
|
||||
admin_library: ckeditor5/admin.table
|
||||
toolbar_items:
|
||||
insertTable:
|
||||
label: table
|
||||
elements:
|
||||
- <table>
|
||||
- <tr>
|
||||
- <td>
|
||||
- <th>
|
||||
- <thead>
|
||||
- <tbody>
|
||||
- <tfoot>
|
||||
|
||||
ckeditor5_image:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- image.Image
|
||||
- image.ImageToolbar
|
||||
- drupalImage.DrupalImage
|
||||
config:
|
||||
image:
|
||||
toolbar: [imageTextAlternative]
|
||||
drupal:
|
||||
label: Image
|
||||
library: ckeditor5/drupal.ckeditor5.image
|
||||
elements:
|
||||
- <img src alt data-entity-uuid data-entity-type height width>
|
||||
conditions:
|
||||
toolbarItem: uploadImage
|
||||
imageUploadStatus: true
|
||||
|
||||
ckeditor5_imageCaption:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- image.ImageCaption
|
||||
config:
|
||||
image:
|
||||
toolbar: [toggleImageCaption]
|
||||
drupal:
|
||||
label: Image caption
|
||||
elements:
|
||||
- <img data-caption>
|
||||
conditions:
|
||||
toolbarItem: uploadImage
|
||||
imageUploadStatus: true
|
||||
filter: filter_caption
|
||||
|
||||
ckeditor5_imageAlign:
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- image.ImageStyle
|
||||
config:
|
||||
image:
|
||||
toolbar:
|
||||
- name: 'imageStyle:icons'
|
||||
items:
|
||||
- 'imageStyle:alignLeft'
|
||||
- 'imageStyle:alignCenter'
|
||||
- 'imageStyle:alignRight'
|
||||
defaultItem: 'imageStyle:alignCenter'
|
||||
drupal:
|
||||
label: Image align
|
||||
elements:
|
||||
- <img data-align>
|
||||
conditions:
|
||||
toolbarItem: uploadImage
|
||||
imageUploadStatus: true
|
||||
filter: filter_align
|
||||
|
||||
ckeditor5_indent:
|
||||
ckeditor5:
|
||||
plugins: [indent.Indent]
|
||||
drupal:
|
||||
label: Indent
|
||||
elements: false
|
||||
library: core/ckeditor5.indent
|
||||
admin_library: ckeditor5/admin.indent
|
||||
toolbar_items:
|
||||
indent:
|
||||
label: Indent
|
||||
outdent:
|
||||
label: Outdent
|
||||
|
||||
ckeditor5_language:
|
||||
ckeditor5:
|
||||
plugins: [language.TextPartLanguage]
|
||||
drupal:
|
||||
label: Language
|
||||
library: ckeditor5/ckeditor5.language
|
||||
admin_library: ckeditor5/admin.language
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
|
||||
toolbar_items:
|
||||
textPartLanguage:
|
||||
label: Language
|
||||
elements:
|
||||
- <span lang dir>
|
||||
|
||||
media_media:
|
||||
provider: media
|
||||
ckeditor5:
|
||||
plugins:
|
||||
- drupalMedia.DrupalMedia
|
||||
config:
|
||||
drupalMedia:
|
||||
toolbar: [mediaImageTextAlternative]
|
||||
themeError:
|
||||
func:
|
||||
name: Drupal.theme
|
||||
args: [mediaEmbedPreviewError]
|
||||
invoke: true
|
||||
drupal:
|
||||
label: Media
|
||||
library: ckeditor5/drupal.ckeditor5.media
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media
|
||||
elements:
|
||||
- <drupal-media data-entity-type data-entity-uuid alt>
|
||||
conditions:
|
||||
filter: media_embed
|
||||
|
||||
media_library_mediaLibrary:
|
||||
provider: media_library
|
||||
ckeditor5:
|
||||
plugins: []
|
||||
config:
|
||||
drupalMedia:
|
||||
openDialog:
|
||||
func:
|
||||
name: Drupal.ckeditor5.openDialog
|
||||
invoke: false
|
||||
dialogSettings:
|
||||
height: 75%
|
||||
dialogClass: media-library-widget-modal
|
||||
title: Add or select media
|
||||
drupal:
|
||||
label: Media Library
|
||||
elements: false
|
||||
admin_library: ckeditor5/admin.drupalmedia
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary
|
||||
library: editor/drupal.editor.dialog
|
||||
toolbar_items:
|
||||
drupalMedia:
|
||||
label: Drupal media
|
||||
conditions:
|
||||
filter: media_embed
|
||||
toolbarItem: drupalMedia
|
|
@ -0,0 +1,8 @@
|
|||
name: CKEditor 5
|
||||
type: module
|
||||
description: "WYSIWYG editing for rich text fields using CKEditor 5."
|
||||
version: VERSION
|
||||
package: Core (Experimental)
|
||||
lifecycle: experimental
|
||||
dependencies:
|
||||
- drupal:editor
|
|
@ -0,0 +1,184 @@
|
|||
# cspell:ignore imageupload
|
||||
|
||||
ckeditor5.language:
|
||||
css:
|
||||
component:
|
||||
css/language.css: {}
|
||||
dependencies:
|
||||
- core/ckeditor5.language
|
||||
|
||||
drupal.ckeditor5.internal:
|
||||
js:
|
||||
js/build/drupalHtmlEngine.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5.internal
|
||||
|
||||
drupal.ckeditor5:
|
||||
js:
|
||||
js/ckeditor5.js: {}
|
||||
css:
|
||||
theme:
|
||||
css/quickedit.css: { }
|
||||
dependencies:
|
||||
- core/jquery
|
||||
- core/drupal
|
||||
- core/drupal.debounce
|
||||
- core/ckeditor5.editorClassic
|
||||
- core/ckeditor5.editorDecoupled
|
||||
- core/ckeditor5
|
||||
- editor/drupal.editor
|
||||
- ckeditor5/drupal.ckeditor5.quickedit-temporary-work-around
|
||||
|
||||
drupal.ckeditor5.quickedit-temporary-work-around:
|
||||
deprecated: "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands."
|
||||
css:
|
||||
theme:
|
||||
css/quickedit-override.css: {}
|
||||
|
||||
drupal.ckeditor5.image:
|
||||
js:
|
||||
js/build/drupalImage.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5.image
|
||||
|
||||
drupal.ckeditor5.emphasis:
|
||||
version: VERSION
|
||||
js:
|
||||
js/build/drupalEmphasis.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5.basic
|
||||
|
||||
drupal.ckeditor5.media:
|
||||
js:
|
||||
js/media_embed_ckeditor5.theme.js: {}
|
||||
js/build/drupalMedia.js: { preprocess: false, minified: true }
|
||||
dependencies:
|
||||
- core/ckeditor5
|
||||
- core/drupal
|
||||
|
||||
ie11.user.warnings:
|
||||
js:
|
||||
js/ie11.user.warnings.js: { }
|
||||
css:
|
||||
theme:
|
||||
css/ie-warnings.css: { }
|
||||
dependencies:
|
||||
- core/drupal
|
||||
- core/drupal.message
|
||||
- editor/drupal.editor
|
||||
- core/modernizr
|
||||
|
||||
ie11.filter.warnings:
|
||||
js:
|
||||
js/ie11.filter.warnings.js: {}
|
||||
dependencies:
|
||||
- core/drupal
|
||||
- core/drupal.message
|
||||
- core/once
|
||||
- core/modernizr
|
||||
|
||||
drupal.ckeditor5.filter.admin:
|
||||
js:
|
||||
js/ckeditor5.filter.admin.js: {}
|
||||
css:
|
||||
theme:
|
||||
css/filter.admin.css: { }
|
||||
dependencies:
|
||||
- core/drupal
|
||||
- core/drupal.message
|
||||
- core/once
|
||||
- core/drupal.ajax
|
||||
|
||||
admin:
|
||||
js:
|
||||
js/ckeditor5.admin.js: { }
|
||||
css:
|
||||
theme:
|
||||
css/toolbar.admin.css: { }
|
||||
dependencies:
|
||||
- core/sortable
|
||||
- filter/drupal.filter.admin
|
||||
- core/jquery
|
||||
- core/once
|
||||
|
||||
admin.specialCharacters:
|
||||
css:
|
||||
theme:
|
||||
css/special-characters.css: { }
|
||||
|
||||
admin.removeFormat:
|
||||
css:
|
||||
theme:
|
||||
css/remove-format.css: { }
|
||||
|
||||
admin.internal:
|
||||
css:
|
||||
theme:
|
||||
css/internal.admin.css: { }
|
||||
|
||||
admin.basic:
|
||||
css:
|
||||
theme:
|
||||
css/basic.admin.css: { }
|
||||
|
||||
admin.blockquote:
|
||||
css:
|
||||
theme:
|
||||
css/blockquote.admin.css: { }
|
||||
|
||||
admin.link:
|
||||
css:
|
||||
theme:
|
||||
css/link.admin.css: { }
|
||||
|
||||
admin.list:
|
||||
css:
|
||||
theme:
|
||||
css/list.admin.css: { }
|
||||
|
||||
admin.heading:
|
||||
css:
|
||||
theme:
|
||||
css/heading.admin.css: { }
|
||||
dependencies:
|
||||
- core/ckeditor5.internal
|
||||
|
||||
admin.horizontalLine:
|
||||
css:
|
||||
theme:
|
||||
css/horizontal-line.admin.css: { }
|
||||
|
||||
admin.alignment:
|
||||
css:
|
||||
theme:
|
||||
css/alignment.admin.css: { }
|
||||
|
||||
admin.imageupload:
|
||||
css:
|
||||
theme:
|
||||
css/imageupload.admin.css: { }
|
||||
|
||||
admin.indent:
|
||||
css:
|
||||
theme:
|
||||
css/indent.admin.css: { }
|
||||
|
||||
admin.language:
|
||||
css:
|
||||
theme:
|
||||
css/language.admin.css: { }
|
||||
|
||||
admin.drupalmedia:
|
||||
css:
|
||||
theme:
|
||||
css/drupalmedia.admin.css: { }
|
||||
|
||||
admin.sourceEditing:
|
||||
css:
|
||||
theme:
|
||||
css/source-editing.admin.css: { }
|
||||
|
||||
admin.table:
|
||||
css:
|
||||
theme:
|
||||
css/table.admin.css: { }
|
|
@ -0,0 +1,398 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Implements hooks for the CKEditor 5 module.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
use Drupal\ckeditor5\Plugin\Editor\CKEditor5;
|
||||
use Drupal\Core\Ajax\AjaxResponse;
|
||||
use Drupal\Core\Ajax\InvokeCommand;
|
||||
use Drupal\Core\Ajax\MessageCommand;
|
||||
use Drupal\Core\Ajax\PrependCommand;
|
||||
use Drupal\Core\Ajax\ReplaceCommand;
|
||||
use Drupal\Core\Ajax\RemoveCommand;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Render\Element;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Symfony\Component\Validator\Constraints\Choice;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function ckeditor5_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
case 'help.page.ckeditor5':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('The CKEditor 5 module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the <a href=":text_editor">Text Editor module</a>. It requires JavaScript to be enabled in the browser. For more information, see the <a href=":doc_url">online documentation for the CKEditor 5 module</a> and the <a href=":cke5_url">CKEditor 5 website</a>.', [':doc_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5', ':cke5_url' => 'https://ckeditor.com/ckeditor-5/', ':text_editor' => Url::fromRoute('help.page', ['name' => 'editor'])->toString()]) . '</p>';
|
||||
$output .= '<h3>' . t('Uses') . '</h3>';
|
||||
$output .= '<dl>';
|
||||
$output .= '<dt>' . t('Enabling CKEditor 5 for individual text formats') . '</dt>';
|
||||
$output .= '<dd>' . t('CKEditor 5 has to be enabled and configured separately for individual text formats from the <a href=":formats">Text formats and editors page</a> because the filter settings for each text format can be different. For more information, see the <a href=":text_editor">Text Editor help page</a> and <a href=":filter">Filter help page</a>.', [':formats' => Url::fromRoute('filter.admin_overview')->toString(), ':text_editor' => Url::fromRoute('help.page', ['name' => 'editor'])->toString(), ':filter' => Url::fromRoute('help.page', ['name' => 'filter'])->toString()]) . '</dd>';
|
||||
$output .= '<dt>' . t('Migration for existing text formats switching to CKEditor 5') . '</dt>';
|
||||
$output .= '<dd>' . t('Text formats switching to CKEditor 5 from CKEditor 4 (or no text editor) should be able to do so with minimal effort and zero data loss. Existing configuration will be automatically migrated to CKEditor 5 compatible configuration. In instances where functionality can not be migrated, detailed messages are provided explaining what is necessary for feature parity.') . '</dd>';
|
||||
$output .= '<dt>' . t('Configuring the toolbar') . '</dt>';
|
||||
$output .= '<dd>' . t('When CKEditor 5 is chosen from the <em>Text editor</em> drop-down menu, its toolbar configuration is displayed. You can add and remove buttons from the <em>Active toolbar</em> by dragging and dropping them. Separators and rows can be added to organize the buttons.') . '</dd>';
|
||||
$output .= '<dt>' . t('Filtering HTML content') . '</dt>';
|
||||
$output .= '<dd>' . t("Unlike other text editors, plugin configuration determines the tags and attributes allowed in text formats using CKEditor 5. If using the <em>Limit allowed HTML tags and correct faulty HTML</em> filter, this filter's values will be automatically set based on enabled plugins and toolbar items.");
|
||||
$output .= '<dt>' . t('Toggling between formatted text and HTML source') . '</dt>';
|
||||
$output .= '<dd>' . t('If the <em>Source</em> button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the HTML tags allowed via plugin configuration (and not explicity disallowed by filters) to format the text. Tags not enabled via plugin configuration will be be stripped out of the HTML source when the user toggles back to the text editor.') . '</dd>';
|
||||
$output .= '<dt>' . t('Developing CKEditor 5 plugins in Drupal') . '</dt>';
|
||||
$output .= '<dd>' . t('See the <a href=":dev_docs_url">online documentation</a> for detailed information on developing CKEditor 5 plugins for use in Drupal.', [':dev_docs_url' => 'https://www.drupal.org/docs/contributed-modules/ckeditor-5/plugin-and-contrib-module-development']) . '</dd>';
|
||||
$output .= '</dd>';
|
||||
$output .= '<dt>' . t('Accessibility features') . '</dt>';
|
||||
$output .= '<dd>' . t('The built in WYSIWYG editor (CKEditor 5) comes with a number of accessibility features. CKEditor 5 comes with built in <a href=":shortcuts">keyboard shortcuts</a>, which can be beneficial for both power users and keyboard only users.', [':shortcuts' => 'https://ckeditor.com/docs/ckeditor5/latest/features/keyboard-support.html']) . '</dd>';
|
||||
$output .= '<dt>' . t('Generating accessible content') . '</dt>';
|
||||
$output .= '<dd>';
|
||||
$output .= '<ul>';
|
||||
// @todo Uncomment this in https://www.drupal.org/project/ckeditor5/issues/3230230
|
||||
// $output .= '<li>' . t('HTML tables can be created with table headers and caption/summary elements.') . '</li>';
|
||||
// @todo Uncomment this in https://www.drupal.org/project/ckeditor5/issues/3222757
|
||||
// $output .= '<li>' . t('Alt text is required by default on images added through CKEditor (note that this can be overridden).') . '</li>';
|
||||
$output .= '<li>' . t('Semantic HTML5 figure/figcaption are available to add captions to images.') . '</li>';
|
||||
$output .= '<li>' . t('To support multilingual page content, CKEditor 5 can be configured to include a language button in the toolbar.') . '</li>';
|
||||
$output .= '</ul>';
|
||||
$output .= '</dd>';
|
||||
$output .= '</dl>';
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
function ckeditor5_theme() {
|
||||
return [
|
||||
// The theme hook is used for rendering the CKEditor 5 toolbar settings in
|
||||
// the Drupal admin UI. The toolbar settings UI is internal, and utilizing
|
||||
// it outside of core usages is not supported because the UI can change at
|
||||
// any point.
|
||||
// @internal
|
||||
'ckeditor5_settings_toolbar' => [
|
||||
'render element' => 'form',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_module_implements_alter().
|
||||
*/
|
||||
function ckeditor5_module_implements_alter(&$implementations, $hook) {
|
||||
// This module's implementation of form_filter_format_form_alter() must happen
|
||||
// after the editor module's implementation, as that implementation adds the
|
||||
// active editor to $form_state. It must also happen after the media module's
|
||||
// implementation so media_filter_format_edit_form_validate can be removed
|
||||
// from the validation chain, as that validator is not needed with CKEditor 5
|
||||
// and will trigger a false error.
|
||||
if ($hook === 'form_alter' && isset($implementations['ckeditor5']) && isset($implementations['editor'])) {
|
||||
$group = $implementations['ckeditor5'];
|
||||
unset($implementations['ckeditor5']);
|
||||
|
||||
$offset = array_search('editor', array_keys($implementations)) + 1;
|
||||
if (array_key_exists('media', $implementations)) {
|
||||
$media_offset = array_search('media', array_keys($implementations)) + 1;
|
||||
$offset = max([$offset, $media_offset]);
|
||||
}
|
||||
$implementations = array_slice($implementations, 0, $offset, TRUE) +
|
||||
['ckeditor5' => $group] +
|
||||
array_slice($implementations, $offset, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function ckeditor5_form_filter_format_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
|
||||
$editor = $form_state->get('editor');
|
||||
|
||||
// CKEditor 5 plugin config determines the available HTML tags. If an HTML
|
||||
// restricting filter is enabled and the editor is CKEditor 5, the 'Allowed
|
||||
// HTML tags' field is made read only and automatically populated with the
|
||||
// values needed by CKEditor 5 plugins.
|
||||
// @see \Drupal\ckeditor5\Plugin\Editor\CKEditor5::buildConfigurationForm()
|
||||
if ($editor && $editor->getEditor() === 'ckeditor5') {
|
||||
if (isset($form['filters']['settings']['filter_html']['allowed_html'])) {
|
||||
$filter_allowed_html = &$form['filters']['settings']['filter_html']['allowed_html'];
|
||||
|
||||
if (isset($form['editor']['settings']['subform']['plugins']['ckeditor5_sourceEditing']['allowed_tags'])) {
|
||||
$source_allowed_tags = &$form['editor']['settings']['subform']['plugins']['ckeditor5_sourceEditing']['allowed_tags'];
|
||||
// @todo if this triggers the callback via keyboard navigation such as
|
||||
// tab, focus should move to the next element, not to the rebuilt
|
||||
// "allowed tags" field
|
||||
// https://www.drupal.org/project/ckeditor5/issues/3231321.
|
||||
$source_allowed_tags['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
'trigger_as' => ['name' => 'editor_configure'],
|
||||
'event' => 'change',
|
||||
];
|
||||
}
|
||||
|
||||
$filter_allowed_html['#value_callback'] = [CKEditor5::class, 'getGeneratedAllowedHtmlValue'];
|
||||
// Set readonly and add the form-disabled wrapper class as using #disabled
|
||||
// or the disabled attribute will prevent the new values from being
|
||||
// validated.
|
||||
$filter_allowed_html['#attributes']['readonly'] = TRUE;
|
||||
$filter_allowed_html['#wrapper_attributes']['class'][] = 'form-disabled';
|
||||
|
||||
$filter_allowed_html['#description'] = t('With CKEditor 5 this is a
|
||||
read-only field. The allowed HTML tags and attributes are determined
|
||||
by the CKEditor 5 configuration. Manually removing tags would break
|
||||
enabled functionality, and any manually added tags would be removed by
|
||||
CKEditor 5 on render.');
|
||||
|
||||
// The media_filter_format_edit_form_validate validator is not needed
|
||||
// with CKEditor 5 as it exists to enforce the inclusion of specific
|
||||
// allowed tags that are added automatically by CKEditor 5. The
|
||||
// validator is removed so it does not conflict with the automatic
|
||||
// addition of those allowed tags.
|
||||
$key = array_search('media_filter_format_edit_form_validate', $form['#validate']);
|
||||
if ($key !== FALSE) {
|
||||
unset($form['#validate'][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Override the AJAX callbacks for changing editors, so multiple areas of the
|
||||
// form can be updated on change.
|
||||
$form['editor']['editor']['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
'trigger_as' => ['name' => 'editor_configure'],
|
||||
];
|
||||
$form['editor']['configure']['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
];
|
||||
|
||||
$form['editor']['settings']['subform']['toolbar']['items']['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
'trigger_as' => ['name' => 'editor_configure'],
|
||||
'event' => 'change',
|
||||
'ckeditor5_only' => 'true',
|
||||
];
|
||||
|
||||
foreach (Element::children($form['filters']['status']) as $filter_type) {
|
||||
$form['filters']['status'][$filter_type]['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
'trigger_as' => ['name' => 'editor_configure'],
|
||||
'event' => 'change',
|
||||
'ckeditor5_only' => 'true',
|
||||
];
|
||||
}
|
||||
|
||||
if (!function_exists('_add_ajax_listeners_to_plugin_inputs')) {
|
||||
|
||||
/**
|
||||
* Recursively adds AJAX listeners to plugin settings elements.
|
||||
*
|
||||
* These are added so allowed tags and other fields that have values
|
||||
* dependent on plugin settings can be updated via AJAX when these settings
|
||||
* are changed in the editor form.
|
||||
*
|
||||
* @param array $plugins_config_form
|
||||
* The plugins config subform render array.
|
||||
*/
|
||||
function _add_ajax_listeners_to_plugin_inputs(array &$plugins_config_form): void {
|
||||
$field_types = [
|
||||
'checkbox',
|
||||
'select',
|
||||
'radios',
|
||||
];
|
||||
if (isset($plugins_config_form['#type']) && in_array($plugins_config_form['#type'], $field_types) && !isset($plugins_config_form['#ajax'])) {
|
||||
$plugins_config_form['#ajax'] = [
|
||||
'callback' => '_update_ckeditor5_html_filter',
|
||||
'trigger_as' => ['name' => 'editor_configure'],
|
||||
'event' => 'change',
|
||||
'ckeditor5_only' => 'true',
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($plugins_config_form as $key => &$value) {
|
||||
if (is_array($value) && strpos($key, '#') === FALSE) {
|
||||
_add_ajax_listeners_to_plugin_inputs($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (isset($form['editor']['settings']['subform']['plugins'])) {
|
||||
_add_ajax_listeners_to_plugin_inputs($form['editor']['settings']['subform']['plugins']);
|
||||
}
|
||||
|
||||
// Add an ID to the filter settings vertical tabs wrapper to facilitate AJAX
|
||||
// updates.
|
||||
$form['filter_settings']['#wrapper_attributes']['id'] = 'filter-settings-wrapper';
|
||||
|
||||
// Add an ID to the editor settings vertical tabs wrapper so it can be easily
|
||||
// targeted by JavaScript.
|
||||
// @todo consider moving this to editor.module when this module is moved to
|
||||
// Drupal core https://www.drupal.org/project/ckeditor5/issues/3231322.
|
||||
$form['editor']['settings']['subform']['plugin_settings']['#wrapper_attributes']['id'] = 'plugin-settings-wrapper';
|
||||
|
||||
$form['#after_build'][] = [CKEditor5::class, 'assessActiveTextEditorAfterBuild'];
|
||||
$form['#validate'][] = [CKEditor5::class, 'validateSwitchingToCKEditor5'];
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX callback handler for filter_format_form().
|
||||
*
|
||||
* Used instead of editor_form_filter_admin_form_ajax from the editor module.
|
||||
*/
|
||||
function _update_ckeditor5_html_filter(array $form, FormStateInterface $form_state) {
|
||||
$response = new AjaxResponse();
|
||||
$renderer = \Drupal::service('renderer');
|
||||
|
||||
// Replace the editor settings with the settings for the currently selected
|
||||
// editor. This is the default behavior of editor.module. Except when using
|
||||
// CKEditor 5: then we only want CKEditor 5's plugin settings to be updated:
|
||||
// the client side-rendered admin UI would otherwise be dependent on network
|
||||
// latency.
|
||||
$renderedField = $renderer->render($form['editor']['settings']);
|
||||
if ($form_state->get('ckeditor5_is_active') && $form_state->get('ckeditor5_is_selected')) {
|
||||
$response->addCommand(new ReplaceCommand('#plugin-settings-wrapper', $form['editor']['settings']['subform']['plugin_settings']['#markup']));
|
||||
}
|
||||
else {
|
||||
$response->addCommand(new ReplaceCommand('#editor-settings-wrapper', $renderedField));
|
||||
}
|
||||
|
||||
if ($form_state->get('ckeditor5_is_active')) {
|
||||
// Delete all existing validation messages, replace them with the current set.
|
||||
$response->addCommand(new RemoveCommand('#ckeditor5-realtime-validation-messages-container > *'));
|
||||
$messages = \Drupal::messenger()->deleteAll();
|
||||
foreach ($messages as $type => $messages_by_type) {
|
||||
foreach ($messages_by_type as $message) {
|
||||
$response->addCommand(new MessageCommand($message, '#ckeditor5-realtime-validation-messages-container', ['type' => $type], FALSE));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If switching to CKEditor 5 triggers a validation error, the real-time
|
||||
// validation messages container will not exist, because CKEditor 5's
|
||||
// configuration form will not be rendered.
|
||||
// In this case, render it into the (empty) editor settings wrapper. When
|
||||
// the validation error is addressed, CKEditor 5's configuration form will
|
||||
// get rendered and will overwrite those validation error messages.
|
||||
$response->addCommand(new PrependCommand('#editor-settings-wrapper', ['#type' => 'status_messages']));
|
||||
}
|
||||
|
||||
// Rebuild filter_settings form item when one of the following is true:
|
||||
// - Switching to CKEditor 5 from another text editor, and the current
|
||||
// configuration triggers no fundamental compatibility errors.
|
||||
// - Switching from CKEditor 5 to a different editor.
|
||||
// - The editor is not being switched, and is currently CKEditor 5.
|
||||
if ($form_state->get('ckeditor5_is_active') || ($form_state->get('ckeditor5_is_selected') && !$form_state->getError($form['editor']['editor']))) {
|
||||
// Replace the filter settings with the settings for the currently selected
|
||||
// editor.
|
||||
$renderedSettings = $renderer->render($form['filter_settings']);
|
||||
$response->addCommand(new ReplaceCommand('#filter-settings-wrapper', $renderedSettings));
|
||||
}
|
||||
|
||||
// If switching to CKEditor 5 from another editor and there are errors in that
|
||||
// switch, add an error class to the editor select, otherwise remove.
|
||||
$response->addCommand(new InvokeCommand('[data-drupal-selector="edit-editor-editor"]', !$form_state->get('ckeditor5_is_active') && $form_state->get('ckeditor5_is_selected') && !empty($form_state->getErrors()) ? 'addClass' : 'removeClass', ['error']));
|
||||
|
||||
if (!function_exists('_add_attachments_to_editor_update_response')) {
|
||||
|
||||
/**
|
||||
* Recursively find #attach items in the form and add as attachments to the
|
||||
* AJAX response.
|
||||
*
|
||||
* @param array $form
|
||||
* A form array.
|
||||
* @param \Drupal\Core\Ajax\AjaxResponse $response
|
||||
* The AJAX response attachments will be added to.
|
||||
*/
|
||||
function _add_attachments_to_editor_update_response(array $form, AjaxResponse &$response): void {
|
||||
foreach ($form as $key => $value) {
|
||||
if ($key === "#attached") {
|
||||
$response->addAttachments(array_diff_key($value, ['placeholders' => '']));
|
||||
}
|
||||
elseif (is_array($value) && strpos((string) $key, '#') === FALSE) {
|
||||
_add_attachments_to_editor_update_response($value, $response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_add_attachments_to_editor_update_response($form, $response);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_library_info_alter().
|
||||
*/
|
||||
function ckeditor5_library_info_alter(&$libraries, $extension) {
|
||||
if ($extension === 'filter') {
|
||||
$libraries['drupal.filter.admin']['dependencies'][] = 'ckeditor5/ie11.filter.warnings';
|
||||
$libraries['drupal.filter.admin']['dependencies'][] = 'ckeditor5/drupal.ckeditor5.filter.admin';
|
||||
}
|
||||
|
||||
// If the 'ckeditor5/ie11.user.warnings' library is added as a dependency of
|
||||
// other Ckeditor 5 libraries, it won't reliably work as the CKEditor 5 assets
|
||||
// are loaded via AJAX, and the IE11-incompatible syntax in CKEditor 5 can
|
||||
// prevent the AJAX call from successfully loading the functionality in
|
||||
// 'ckeditor5/ie11.user.warnings'. Adding this as a dependency of
|
||||
// 'system/base', as excessive as it may seem, is the most reliable way to
|
||||
// assure it is loaded as part of the page request.
|
||||
if ($extension === 'system') {
|
||||
$libraries['base']['dependencies'][] = 'ckeditor5/ie11.user.warnings';
|
||||
}
|
||||
|
||||
if ($extension === 'core') {
|
||||
// Generate libraries for each of the CKEditor 5 translation files so that
|
||||
// the correct translation file can be attached depending on the current
|
||||
// language.
|
||||
$files = scandir('core/assets/vendor/ckeditor5/translations');
|
||||
foreach ($files as $file) {
|
||||
if ($file[0] !== '.' && preg_match('/\.js$/', $file)) {
|
||||
$langcode = basename($file, '.js');
|
||||
$libraries['ckeditor5.translations.' . $langcode] = [
|
||||
'remote' => $libraries['ckeditor5']['remote'],
|
||||
'version' => $libraries['ckeditor5']['version'],
|
||||
'license' => $libraries['ckeditor5']['license'],
|
||||
'js' => [
|
||||
'assets/vendor/ckeditor5/translations/' . $file => ['preprocess' => FALSE, 'minified' => TRUE],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_validation_constraint_alter().
|
||||
*/
|
||||
function ckeditor5_validation_constraint_alter(array &$definitions) {
|
||||
// Add the Symfony validation constraints that Drupal core does not add in
|
||||
// \Drupal\Core\Validation\ConstraintManager::registerDefinitions() for
|
||||
// unknown reasons. Do it defensively, to not break when this changes.
|
||||
if (!isset($definitions['Choice'])) {
|
||||
$definitions['Choice'] = [
|
||||
'label' => 'Choice',
|
||||
'class' => Choice::class,
|
||||
'type' => FALSE,
|
||||
'provider' => 'core',
|
||||
'id' => 'Choice',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_config_schema_info_alter().
|
||||
*/
|
||||
function ckeditor5_config_schema_info_alter(&$definitions) {
|
||||
// In \Drupal\Tests\config\Functional\ConfigImportAllTest, this hook may be
|
||||
// called without ckeditor5.pair.schema.yml being active.
|
||||
if (!isset($definitions['ckeditor5_valid_pair__format_and_editor'])) {
|
||||
return;
|
||||
}
|
||||
// @see filter.format.*.filters
|
||||
$definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['filters'] = $definitions['filter.format.*']['mapping']['filters'];
|
||||
// @see @see editor.editor.*.image_upload
|
||||
$definitions['ckeditor5_valid_pair__format_and_editor']['mapping']['image_upload'] = $definitions['editor.editor.*']['mapping']['image_upload'];
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
ckeditor5.upload_image:
|
||||
path: '/ckeditor5/upload-image/{editor}'
|
||||
defaults:
|
||||
_controller: '\Drupal\ckeditor5\Controller\CKEditor5ImageController::upload'
|
||||
methods: [POST]
|
||||
requirements:
|
||||
_entity_access: 'editor.use'
|
||||
_custom_access: '\Drupal\ckeditor5\Controller\CKEditor5ImageController::imageUploadEnabledAccess'
|
||||
_csrf_token: 'TRUE'
|
||||
options:
|
||||
parameters:
|
||||
editor:
|
||||
type: entity:editor
|
||||
|
||||
ckeditor5.media_image:
|
||||
path: '/ckeditor5/{editor}/is-media-image'
|
||||
defaults:
|
||||
_controller: '\Drupal\ckeditor5\Controller\CKEditor5MediaController::isMediaImage'
|
||||
methods: [GET]
|
||||
requirements:
|
||||
_entity_access: 'editor.use'
|
||||
_custom_access: '\Drupal\ckeditor5\Controller\CKEditor5MediaController::access'
|
||||
_csrf_token: 'TRUE'
|
||||
options:
|
||||
parameters:
|
||||
editor:
|
||||
type: entity:editor
|
|
@ -0,0 +1,15 @@
|
|||
services:
|
||||
plugin.manager.ckeditor5.plugin:
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor5PluginManager
|
||||
parent: default_plugin_manager
|
||||
# @todo Remove in Drupal 11: https://www.drupal.org/project/ckeditor5/issues/3239012
|
||||
plugin.manager.ckeditor4to5upgrade.plugin:
|
||||
public: false
|
||||
class: Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginManager
|
||||
parent: default_plugin_manager
|
||||
ckeditor5.smart_default_settings:
|
||||
class: Drupal\ckeditor5\SmartDefaultSettings
|
||||
arguments:
|
||||
- '@plugin.manager.ckeditor5.plugin'
|
||||
- '@plugin.manager.ckeditor4to5upgrade.plugin'
|
||||
- '@?plugin.manager.ckeditor.plugin'
|
|
@ -0,0 +1,12 @@
|
|||
# @see https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html
|
||||
ckeditor5.toolbar_item:
|
||||
type: string
|
||||
label: 'Toolbar item'
|
||||
constraints:
|
||||
CKEditor5ToolbarItem: []
|
||||
|
||||
ckeditor5.element:
|
||||
type: string
|
||||
label: 'Element'
|
||||
constraints:
|
||||
CKEditor5Element: []
|
|
@ -0,0 +1,15 @@
|
|||
# @see ckeditor5_config_schema_info_alter()
|
||||
ckeditor5_valid_pair__format_and_editor:
|
||||
type: mapping
|
||||
label: 'Text Format plus Text Editor pair using CKEditor 5'
|
||||
constraints:
|
||||
CKEditor5FundamentalCompatibility: []
|
||||
mapping:
|
||||
settings:
|
||||
type: editor.settings.ckeditor5
|
||||
# @see ckeditor5_config_schema_info_alter()
|
||||
# @see filter.format.*.filters
|
||||
filters: {}
|
||||
# @see ckeditor5_config_schema_info_alter()
|
||||
# @see editor.editor.*.image_upload
|
||||
image_upload: {}
|
|
@ -0,0 +1,76 @@
|
|||
# Schema for the configuration files of the CKEditor5 module.
|
||||
|
||||
editor.settings.ckeditor5:
|
||||
type: mapping
|
||||
label: 'CKEditor 5 settings'
|
||||
mapping:
|
||||
toolbar:
|
||||
type: mapping
|
||||
label: 'Toolbar configuration'
|
||||
mapping:
|
||||
items:
|
||||
type: sequence
|
||||
label: 'Items'
|
||||
sequence:
|
||||
type: ckeditor5.toolbar_item
|
||||
label: 'Button'
|
||||
constraints:
|
||||
# Each active CKEditor 5 toolbar item whose plugin has conditions must have those conditions met.
|
||||
CKEditor5ToolbarItemConditionsMet: []
|
||||
plugins:
|
||||
type: sequence
|
||||
label: 'Plugins'
|
||||
sequence:
|
||||
type: ckeditor5.plugin.[%key]
|
||||
constraints:
|
||||
# Each enabled CKEditor 5 plugin that implements \Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableInterface
|
||||
# must exist in here.
|
||||
CKEditor5EnabledConfigurablePlugins: []
|
||||
|
||||
# Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language
|
||||
ckeditor5.plugin.ckeditor5_language:
|
||||
type: mapping
|
||||
label: 'Language'
|
||||
mapping:
|
||||
language_list:
|
||||
type: string
|
||||
label: 'Language list ID'
|
||||
constraints:
|
||||
# Configuring this does not make sense without the corresponding button.
|
||||
CKEditor5ToolbarItemDependencyConstraint:
|
||||
toolbarItem: textPartLanguage
|
||||
# Only two possible values are accepted.
|
||||
Choice:
|
||||
- un
|
||||
- all
|
||||
|
||||
# Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading
|
||||
ckeditor5.plugin.ckeditor5_heading:
|
||||
type: mapping
|
||||
label: Headings
|
||||
mapping:
|
||||
enabled_headings:
|
||||
type: sequence
|
||||
label: 'Enabled Headings'
|
||||
constraints:
|
||||
NotBlank:
|
||||
message: "Enable at least one heading, otherwise disable the Heading plugin."
|
||||
sequence:
|
||||
type: string
|
||||
label: 'Heading type'
|
||||
constraints:
|
||||
Choice:
|
||||
callback: \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading::validChoices
|
||||
|
||||
ckeditor5.plugin.ckeditor5_sourceEditing:
|
||||
type: mapping
|
||||
label: Source Editing
|
||||
mapping:
|
||||
allowed_tags:
|
||||
type: sequence
|
||||
label: 'Allowed Tags'
|
||||
sequence:
|
||||
type: ckeditor5.element
|
||||
label: 'Allowed Tag'
|
||||
constraints:
|
||||
SourceEditingRedundantTags: []
|
|
@ -0,0 +1,45 @@
|
|||
.ckeditor5-toolbar-button-alignment\:left {
|
||||
background-image: url(../icons/align-left.svg);
|
||||
}
|
||||
.ckeditor5-toolbar-button-alignment\:right {
|
||||
background-image: url(../icons/align-right.svg);
|
||||
}
|
||||
.ckeditor5-toolbar-button-alignment\:center {
|
||||
background-image: url(../icons/align-center.svg);
|
||||
}
|
||||
.ckeditor5-toolbar-button-alignment\:justify {
|
||||
background-image: url(../icons/align-justify.svg);
|
||||
}
|
||||
.ckeditor5-toolbar-button-alignment {
|
||||
background-image: url(../icons/align-left.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-alignment {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-right: 20px;
|
||||
background-position-x: 10px;
|
||||
}
|
||||
[dir="rtl"] .ckeditor5-toolbar-button-alignment {
|
||||
padding-right: 0;
|
||||
padding-left: 20px;
|
||||
background-position-x: 30px;
|
||||
}
|
||||
.ckeditor5-toolbar-button-alignment::after {
|
||||
position: relative;
|
||||
right: -10px;
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
content: "";
|
||||
transform: rotate(135deg);
|
||||
color: #000;
|
||||
border-width: 2px 2px 0 0;
|
||||
border-style: solid;
|
||||
background-position-x: -10px;
|
||||
}
|
||||
[dir="rtl"] .ckeditor5-toolbar-button-alignment::after {
|
||||
right: 10px;
|
||||
background-position-x: 10px;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
.ckeditor5-toolbar-button-bold {
|
||||
background-image: url(../icons/bold.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-italic {
|
||||
background-image: url(../icons/italic.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-underline {
|
||||
background-image: url(../icons/underline.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-code {
|
||||
background-image: url(../icons/code.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-strikethrough {
|
||||
background-image: url(../icons/strikethrough.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-subscript {
|
||||
background-image: url(../icons/subscript.svg);
|
||||
}
|
||||
|
||||
.ckeditor5-toolbar-button-superscript {
|
||||
background-image: url(../icons/superscript.svg);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
.ckeditor5-toolbar-button-blockQuote {
|
||||
background-image: url(../icons/blockquote.svg);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue