Skip to content

Commit 4128f31

Browse files
DOC-1723 - Update link_quicklink option and mceLink command documentation (#4002)
* Docs: DOC-1723 - Update link_quicklink option and mceLink command documentation * Update modules/ROOT/partials/configuration/link_quicklink.adoc Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud> --------- Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
1 parent 4ccb4b8 commit 4128f31

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
[[mceLink]]
12
[cols="1,3",options="header"]
23
|===
34
|Command |Description
4-
|mceLink |Opens the Link or Quicklink Dialog at the current cursor position or for the current selection.
5+
|mceLink |Opens the Link dialog or the link context toolbar at the current cursor position or for the current selection. The behaviour depends on the xref:link.adoc#link_quicklink[`+link_quicklink+`] option. Pass `+{ dialog: true }+` as the third argument to always open the full Link dialog, even when `+link_quicklink+` is enabled.
56
|===
67

7-
.Example
8+
.Example: open link dialog or context toolbar (default behaviour)
89
[source,js]
910
----
1011
tinymce.activeEditor.execCommand('mceLink');
1112
----
13+
14+
.Example: always open the full Link dialog
15+
[source,js]
16+
----
17+
tinymce.activeEditor.execCommand('mceLink', false, { dialog: true });
18+
----

modules/ROOT/partials/configuration/link_quicklink.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
[[link_quicklink]]
22
== `+link_quicklink+`
33

4-
This option changes the behaviour of the `+CTRL + K+` shortcut. By default, pressing `+CTRL + K+` will open the link dialog. If `+link_quicklink+` is set to `+true+`, pressing `+CTRL + K+` will instead open the link context toolbar. If the cursor is within an existing link, this context toolbar will contain fields for modifying, removing and opening the selected link. If not, the context toolbar allows for the quick insertion of a link.
4+
This option changes the behaviour of the `+CTRL + K+` shortcut and the xref:link.adoc#mceLink[`+mceLink+`] command.
5+
6+
When `+link_quicklink+` is set to `+false+`, pressing `+CTRL + K+` or executing the `+mceLink+` command will open the Link dialog.
7+
8+
When `+link_quicklink+` is set to `+true+`, pressing `+CTRL + K+` will open the link context toolbar instead, though the Link dialog can still be opened by running `+editor.execCommand('mceLink', false, { dialog: true })+`.
9+
10+
When a link is selected, the link context toolbar contains fields and buttons for modifying, removing and opening the selected link. When the selection doesn't contain a link, the link context toolbar contains fields and buttons for quickly inserting a link.
511

612
NOTE: This context toolbar is the same as the context toolbar mentioned in the xref:link.adoc#link_context_toolbar[`+link_context_toolbar+`] documentation above.
713

0 commit comments

Comments
 (0)