Index: lams_central/web/ckeditor/README.md =================================================================== diff -u -r47878417b86a5be6d98fe3c2323d6c6a8121c54a -rcfec5d4c0ffe681e5e2604dc1163b309974e21f0 --- lams_central/web/ckeditor/README.md (.../README.md) (revision 47878417b86a5be6d98fe3c2323d6c6a8121c54a) +++ lams_central/web/ckeditor/README.md (.../README.md) (revision cfec5d4c0ffe681e5e2604dc1163b309974e21f0) @@ -298,4 +298,18 @@ ``` a.changeAttr("aria-label",c);c&&a.changeAttr("title",c) ``` -(As in [https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=4f3c21320d4784bc94f86b946f1fd304ce442b01](https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=4f3c21320d4784bc94f86b946f1fd304ce442b01)) \ No newline at end of file +(As in [https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=4f3c21320d4784bc94f86b946f1fd304ce442b01](https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=4f3c21320d4784bc94f86b946f1fd304ce442b01)) + +- Fix error when editing image properties and there are no classes set +The error in JS console: "Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty." +In ckeditor.js change + +``` +type:CKEDITOR.NODE_ELEMENT,addClass:g?function(a){this.$.classList.(a);return this} +``` +to + +``` +type:CKEDITOR.NODE_ELEMENT,addClass:g?function(a){if(a)this.$.classList.(a);return this} +``` +(As in [https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=eeda79bdd48109a22afef04c841d99ec832f9a72](https://code.lamsfoundation.org/fisheye/changelog/lams-github?cs=eeda79bdd48109a22afef04c841d99ec832f9a72)) \ No newline at end of file Index: lams_central/web/ckeditor/ckeditor.js =================================================================== diff -u -r47878417b86a5be6d98fe3c2323d6c6a8121c54a -rcfec5d4c0ffe681e5e2604dc1163b309974e21f0 --- lams_central/web/ckeditor/ckeditor.js (.../ckeditor.js) (revision 47878417b86a5be6d98fe3c2323d6c6a8121c54a) +++ lams_central/web/ckeditor/ckeditor.js (.../ckeditor.js) (revision cfec5d4c0ffe681e5e2604dc1163b309974e21f0) @@ -96,7 +96,7 @@ CKEDITOR.dom.element.setMarker=function(a,d,b,c){var g=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),f=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[g]=d;f[b]=1;return d.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)}; CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),g=d.getCustomData("list_marker_id"),f;for(f in c)d.removeCustomData(f);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[g])}; (function(){function a(a,b){return-1<(" "+a+" ").replace(f," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,e=l[a].length;cCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a); var e=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=e.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else e.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):