Issue #2405💬 AnsweredOpened November 13, 2019by fmr4110 reactions

Ckeditor is not initialized when replace trait text

Quick answerby artf

As you're still using the old API definition (which is quite an error-prone) I recommend reading first the documentation about Component then probably you'll find the issue

Read full answer below ↓

Question

why when i change the ckeditor trait text it is not initialized my trait <pre> domComps.addType('text',{ model: dModel.extend({ defaults: Object.assign({}, dModel.prototype.defaults, { traits: [ {label:"Font Size", type:"text_fontsize"} ], }), }, { isComponent: function(el) { if (el.getAttribute && "text" == el.getAttribute("data-gjs-type")) return {type: "text"} }, }), view: dView, }); </pre> there is no ckeditor class in the component

Answers (3)

artfNovember 16, 2019

As you're still using the old API definition (which is quite an error-prone) I recommend reading first the documentation about Component then probably you'll find the issue

fmr411November 18, 2019

or is there another way to add trait (for text) so that ckeditor can work

artfNovember 19, 2019

In the documentation you can see how to extend other components

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.