In my current Rails project, I have successfully set up a CKEditor instance in readOnly mode. Everything is functioning as expected.
Now, I am attempting to add a custom plugin button to the toolbar while keeping the textarea in readOnly mode.
After some research, I came across an example here: which suggests that readOnly availability can be defined in the plugin's definition.
Following this advice, I made the following changes to my code:
editor.ui.add('normal_values', CKEDITOR.UI_MENUBUTTON, { label: 'Reference Ranges', modes: {wysiwyg: 1}, readOnly: 0, icon: '<%= asset_path("icons/book-open.png") %>', onMenu: function () { var active = {}; for (var p in items) active[p] = CKEDITOR.TRISTATE_OFF; return active; } });
Upon debugging in the browser, I can see the property being passed through Toolbar Object in Javascript Chrome Debugger
However, the plugin button still does not appear.
If anyone has suggestions or guidance on what else I could try, it would be greatly appreciated.
Thank you for your assistance.