CKEditor not being disabled

Hi, I’m trying to disable my CKEditor field but doing setEnabled(false) is not disabling it.
Is it a general problem with CKEditor or am I doing something wrong?

It seems that it is not possible to disable CKEditor, only to set it to readOnly mode. As I have extended
CKEditorTextField for several reasons, I have ovewritten the setEnabled method:

@Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); setReadOnly(!enabled); } I’m ovewritting it instead of just using setReadOnly because like this way I get a v-disabled class and because I don’t want to treat CKEditor different when I disable all the fields of a form using a loop.

I think we probably didn’t get our methods lined up best.

For example, setReadOnly(boolean) probably should do what we do with setViewWithoutEditor(boolean). That is, when in read-only mode, it would get rid of the editor entirely and just show the contents.

Then setDisabled(boolean) would work something like you have suggested with the editor still visible, perhaps, but not usable. Then again, I don’t know if ckeditor really supports all of that as even a readonly editor has some functionality to it and it even seems to allow some changes to be input under certain circumstances and under some browsers, though the changes are never saved when in read only mode.

At any rate, you may find your setEnabled() subclassed method might want to use setViewWithEditor() instead of setReadOnly() so a disabled editor will not only look disabled, but it won’t show the editor at all, just the contents.

Oh well, the key is you get it working as you need it.