Provide custom templates to Rich Text widget using Content Templates (CKEditor 4 plugin)

0
The Rich Text widget is actually CKEditor 4. If the property “Toolbar” is set to full, the “Content Template” button is added to the toolbar. The three default templates, that come with the plugin for demonstration purpose, are available, but they are not of much use in a real world application.    So the question is: How do I provide the widget with custom templates of my choice? The widget properties appear not to provide any means to define custom templates to choose from. Perhaps a nanoflow with a JavaScript action might be of use, but I did not find a way to import the required dependency “ckeditor/ckeditor.js”.    See https://ckeditor.com/docs/ckeditor4/latest/features/templates.html#defining-templates   Until now, the only way I found is to unpack the RichText.mpk and change the appropriate files, but that would not be a sustainable solution in production.
asked
2 answers
1

Created a pull request feat(rich-text-web): make content templates for RichText widget (CKEditor 4) customizable by tobias-at-work · Pull Request #401 · mendix/web-widgets (github.com)

answered
0

I am under the impression that the Rich Text widget does not yet support custom templates. Hence I added the missing widget code in a fork: https://github.com/tobias-at-work/web-widgets

answered