CKEditor in Backend Modules

Hi,

I would like to use our CKEditor (including plugins, like our Link-Plugin) and potentially other editors of the Neos.UI package in a custom Neos backend module.

Could anybody give me a hint how to go about it or whether that’s just not feasible?

I think I’ve seen Neos editors being used outside of the content module, but I can’t find it anymore.

Thanks :slight_smile:

Hi Bastian,

it’s been a while since you asked, but did you find a solution for this? I am looking for the same feature or a way to do something like that at the moment.

If you were able to find a solution back then, I would be thankful if you could give me a hint :slight_smile:

I ended up bundling the classic CKEditor and initializing it via a script for my backend module:

window.addEventListener('DOMContentLoaded', () => {
	document.querySelectorAll('textarea[data-rte]').forEach((element) => {
		ClassicEditor.create(element, JSON.parse(element.dataset.rte));
	});
});

This allows to just use a textarea like

<textarea data-rte="<JSON-encoded-config>"></textarea>

in the Backend, for example:

<textarea data-rte="{&quot;toolbar&quot;:[&quot;heading&quot;,&quot;|&quot;,&quot;bold&quot;,&quot;italic&quot;,&quot;link&quot;,&quot;bulletedList&quot;]}" name="someName">some <b>HTML</b></textarea>