Opened 9 years ago
Closed 9 years ago
#14685 closed Bug (invalid)
Restoring editor to the editable mode should respect command buttons state
Reported by: | mdprw | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Read-only | Version: | |
Keywords: | Cc: |
Description
Steps to reproduce
- Open any CKEditor full featured:
http://nightly.ckeditor.com/full/samples/
- Disable templates command button:
CKEDITOR.instances.editor.commands.templates.disable();
- Set editor to readOnly mode:
CKEDITOR.instances.editor.setReadOnly();
- Set editor to editable mode:
CKEDITOR.instances.editor.setReadOnly(false);
Expected result
Previously disabled command buttons should mantain their state
Actual result
The command button is enabled
Other details (browser, OS, CKEditor version, installed plugins)
OS: Windows 7 Browser: Firefox 46.0.1 CKEditor: 4.5.9
Change History (1)
comment:1 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.5.9 |
You could always use http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-readOnly event to customize this behaviour, and this is implementer part to maintain custom parts here. In general it's preferred to automatically maintain command status with http://docs.ckeditor.com/#!/api/CKEDITOR.commandDefinition-property-readOnly
Please also note that some buttons are disabled before and after setting read-only. They handle their state managing
CKEDITOR.TRISTATE_DISABLED
andCKEDITOR.TRISTATE_OFF
. Please check the indent, link (unlink) or clipboard plugins.