Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions modules/ROOT/partials/configuration/readonly.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ tinymce.init({

liveDemo::readonly-demo[]

=== Example: switching modes programmatically

Use the xref:apis/tinymce.editormode.adoc#set[`+editor.mode.set()+`] API to switch between `+readonly+` and `+design+` (editable) modes at runtime:

[source,js]
----
const editor = tinymce.activeEditor;
// Switch to read-only
editor.mode.set('readonly');
// Switch back to editable
editor.mode.set('design');
----

=== Behavior in `readonly` mode

[cols="1,3,1", options="header"]
Expand Down
Loading