How to properly destroy CKEditor instance?

I had this problem. What a pain. To properly destroy the editor instance, try if (CKEDITOR.instances.myInstanceName) CKEDITOR.instances.myInstanceName.destroy(); From the documentation here I solved the missing content issue by assigning the contents of the editor to a hidden field prior to postback. I’m using ASP.Net, but it should work universally. in the client-side click handler of … Read more

CKEditor 5 – How to insert some HTML (aka. where’s the source mode)?

Yes, it’s possible to insert html into CKEditor5: insertHTML(html:string) { // See: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/faq.html#where-are-the-editorinserthtml-and-editorinserttext-methods-how-to-insert-some-content const viewFragment = this.editor.data.processor.toView( html ); const modelFragment = this.editor.data.toModel( viewFragment ); this.editor.model.insertContent(modelFragment); }

Get computed font size for DOM element in JS

You could try to use the non-standard IE element.currentStyle property, otherwise you can look for the DOM Level 2 standard getComputedStyle method if available : function getStyle(el,styleProp) { var camelize = function (str) { return str.replace(/\-(\w)/g, function(str, letter){ return letter.toUpperCase(); }); }; if (el.currentStyle) { return el.currentStyle[camelize(styleProp)]; } else if (document.defaultView && document.defaultView.getComputedStyle) { return … Read more

CKEditor, Image Upload (filebrowserUploadUrl)

The URL should point to your own custom filebrowser url you might have. I have already done this in one of my projects, and I have posted a tutorial on this topic on my blog Integrating FCKEditor FileManager in CKEditor The tutorial gives a step by step instructions about how to integrate the inbuilt FileBrowser … Read more

CKEDITOR – prevent adding image dimensions as a css style

You can resolve the issue by inserting this code in config.js of your CKEditor CKEDITOR.on(‘instanceReady’, function (ev) { ev.editor.dataProcessor.htmlFilter.addRules( { elements: { $: function (element) { // Output dimensions of images as width and height if (element.name == ‘img’) { var style = element.attributes.style; if (style) { // Get the width from the style. var … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)