I want to enable read only mode for my ckeditor but when I use enableReadOnlyMode doesn't work.
import '../../../../public/assets/vendor/ckeditor5-41.2.0/build/ckeditor';
import CKEditor from '@ckeditor/ckeditor5-vue';
const Editor = ClassicEditor;
const ckeditor = CKEditor.component;
const editorConfig = {};
Editor.enableReadOnlyMode( 'my-feature-id' );
<ckeditor
class="ckeditor no-preflight"
id="ckeditor"
:editor="Editor"
v-model="form.description"
:config="editorConfig"
></ckeditor>
it shows me this error in console:
Form.vue:32 Uncaught (in promise) TypeError: Editor.enableReadOnlyMode is not a function
The function can be called once the ckeditor is ready, which probably won't be exactly when the Vue component is created or mounted, but the editor itself will emit
readyevent which you can use to then call editor functions.