Issue #579Opened November 28, 2017by NorthstarTech0 reactions

replacing richtexteditor to ckeditor

Question

Code SnippetTEXT
I am replacing richtexteditor to ckeditor in grapesjs but its not working. Richtexteditor is still showing. How should I resolve this? My code is:
 editor.setCustomRte({
	 enable: function(el, rte) {
		rte = new CKEDITOR.inline(el, {
			toolbar: [{
		           attributes: { "class": "fa fa-image" },
		           command: "open-dialog"
		        } ]  
		}); 
		return rte; 
     },
   });

I also added these scripts, 
<script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script>
<script src="js/grapesjs-plugin-ckeditor.min.js"></script>

Answers (3)

ryandebaNovember 28, 20170 reactions

Hi @NorthstarTech,

I see that your code is including the grapesjs-plugin-ckeditor.js file. Are you also including that plugin when calling grapesjs.init() as shown here?

NorthstarTechNovember 28, 20170 reactions

yes I also added the plugin on grapesjs.init() but not working. It gives the error shown below. error

ryandebaNovember 28, 20170 reactions

I'm not super familiar with the ckeditor plugin, but it does appear to that it is expecting the sharedspace ckeditor plugin (see here). I think you just need to be sure and include that plugin in your CKEditor configuration. Here's a link to that plugin, but I bet you could also do a custom build of CKEditor through their website and choose to include that from the Available Plugins list.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.