Skip to content

Commit 2bc796e

Browse files
authored
DOC-2586: New disabled option for disabling all user interactions (#3527)
1 parent ed53b54 commit 2bc796e

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

modules/ROOT/pages/7.6.0-release-notes.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
137137
=== <TINY-vwxyz 1 changelog entry>
138138
// #TINY-vwxyz1
139139

140+
== New `+disabled+` option for disabling all user interactions
141+
142+
A new `+disabled+` option has been introduced to {productname} in version {release-version}. This option allows integrators to disable all user interactions with the editor, including cursor placement, content modifications, and UI components. When set to `+true+`, the editor behaves similarly to the readonly mode changes introduced in {productname} 7.4.0 but ensures complete non-interactivity.
143+
144+
.Example disabling all user interactions with the editor
145+
[source,js]
146+
----
147+
tinymce.init({
148+
selector: 'textarea', // Specify the target HTML element
149+
disabled: true // Disables all interactions with the editor
150+
});
151+
----
152+
153+
For more information on the `+disabled+` option, see xref:editor-important-options.adoc#disabled[Disabled] option.
140154

141155
[[additions]]
142156
== Additions

modules/ROOT/pages/editor-important-options.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ include::partial$configuration/external_plugins.adoc[leveloffset=+1]
3535

3636
include::partial$configuration/readonly.adoc[leveloffset=+1]
3737

38+
== Setting the editor in a disabled state
39+
40+
include::partial$configuration/disabled.adoc[leveloffset=+1]
41+
3842
== Executing custom functions while the editor starts (initializes)
3943

4044
include::partial$configuration/setup.adoc[leveloffset=+1]

modules/ROOT/pages/events.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ The following events are provided by the {productname} editor.
160160
|ObjectResized |`+{ target: HTMLElement, width: number, height: number, origin: string }+` |Fired when an object (such as an image) has finished being resized.
161161
|ObjectResizeStart |`+{ target: HTMLElement, width: number, height: number, origin: string }+` |Fired when an object (such as an image) is about to be resized.
162162
|SwitchMode |`+{ mode: string }+` |Fired when the editor mode is changed. The available modes are "design" and "readonly". Additional modes can be registered using {productname} API xref:apis/tinymce.editormode.adoc#register['tinymce.activeEditor.mode.register()'].
163+
|DisabledStateChange |+{ state: boolean }+ |Fired when the editor disabled mode state changes.
163164
|ScrollWindow |(Same data as the native https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event[scroll event]) |Fired when the window has scrolled.
164165
|ResizeWindow |(Same data as the native https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event[resize event]) |Fired when the window is resized.
165166
|BeforeExecCommand |`+{ command: string, ui?: boolean, value?: any }+` |Fired before a command is executed.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[disabled]]
2+
3+
== `+disabled+`
4+
5+
Disables all user interactions with the editor (including cursor placement, content modifications, UI components). This option provides behavior similar to the changes made to {productname} in 7.4.0 readonly mode. When enabled, the editor becomes completely non-interactive.
6+
7+
To programmatically enable/disable the editor, use `+tinymce.activeEditor.options.set('disabled', false/true)+`.
8+
9+
*Type:* `+Boolean+`
10+
11+
*Default value:* `+false+`
12+
13+
*Possible values:* `+true+`, `+false+`
14+
15+
=== Example: using `+disabled+`
16+
17+
[source,js]
18+
----
19+
tinymce.init({
20+
selector: 'textarea', // change this value according to your HTML
21+
disabled: true
22+
});
23+
----

0 commit comments

Comments
 (0)