3

It works for me, just changing the config file: { "buttons": ["html", "bold", "italic"], "plugins": ["fullscreen", "**limiter**", "counter"], "linkNewTab": true, "toolbarFixed": true, **"limiter": 235** }


3

I asked the question on the Slack channel & got my answer. Thank you @kenyonkowal. The best way to customize your rich text editor is to use Redactor instead of CKeditor. You need to add a config file to the config folder, i.e. config/redactor/basic.json and then in that you would put { "formatting": ["p", "h2"], "buttons": ["formatting", "bold", "...


2

I don't think so. You can see the entire code here ClassicEditor .create(document.getElementById('{$nsId}')) .then(function(editor) { $(editor.element).closest('form').on('submit', function() { editor.updateEditorElement(); }); }) This is the javascript that triggers the editor, as you can see, there are no config settings ...


2

Imperavi, creators of Redactor provide the Limiter plugin to add this functionality but you would need to create a Craft plugin to add the JS, as detailed in this answer.


2

Redactor applies all kinds of 'improvements' to your HTML on save. You might be able to prevent this behaviour by altering the config. If you want to use a plain text field for html, your only problem is that Twig applies html_encode to outputted text. You can prevent this by using the |raw filter: {{ entry.plainTextField |raw }}


1

This has been fixed in the master branch, but not yet tagged in a release: https://github.com/craftcms/ckeditor/pull/6 Until it's tagged, you won't be able to get that fix in from the Plugin Store, but you can pull it in with Composer in the command line if you want. FWIW, it's currently a pretty minimal beta version of the plugin using an older dev ...


1

Brad's answer should work - it makes perfect sense and it is technically correct - but for some reason it didn't for me. Given that the goal for me was to become unstuck rather than explore the reason why, I did something that is not by any means precise, but it does the job. I just tested against the length of the ckeditor field contents, the assumption ...


1

At least with the 1.0.0-beta2 release of the plugin (which is using an old CKEditor 5 Developer Preview v0.11.0) build, an empty field will will output an <p> </p> tag pair. This behavior might change once it gets updated to a stable release. Kinda lame, but for now you could do something like this: {% set entry = craft.entries.id(2).one() %} ...


Only top voted, non community-wiki answers of a minimum length are eligible