MCPcopy Create free account
hub / github.com/ckeditor/ckeditor5-react / toggleReadOnly

Function toggleReadOnly

demos/npm-react/EditorDemo.tsx:49–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 };
48
49 const toggleReadOnly = () => {
50 const editor = state.editor!;
51
52 if ( editor.isReadOnly ) {
53 editor.disableReadOnlyMode( SAMPLE_READ_ONLY_LOCK_ID );
54 } else {
55 editor.enableReadOnlyMode( SAMPLE_READ_ONLY_LOCK_ID );
56 }
57 };
58
59 const simulateError = () => {
60 setTimeout( () => {

Callers 1

EditorDemoFunction · 0.70

Calls 2

disableReadOnlyModeMethod · 0.80
enableReadOnlyModeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…