diff --git a/modules/ROOT/partials/commands/link-cmds.adoc b/modules/ROOT/partials/commands/link-cmds.adoc index 102ffbdd84..8557fe7ec4 100644 --- a/modules/ROOT/partials/commands/link-cmds.adoc +++ b/modules/ROOT/partials/commands/link-cmds.adoc @@ -1,11 +1,18 @@ +[[mceLink]] [cols="1,3",options="header"] |=== |Command |Description -|mceLink |Opens the Link or Quicklink Dialog at the current cursor position or for the current selection. +|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. |=== -.Example +.Example: open link dialog or context toolbar (default behaviour) [source,js] ---- tinymce.activeEditor.execCommand('mceLink'); ---- + +.Example: always open the full Link dialog +[source,js] +---- +tinymce.activeEditor.execCommand('mceLink', false, { dialog: true }); +---- diff --git a/modules/ROOT/partials/configuration/link_quicklink.adoc b/modules/ROOT/partials/configuration/link_quicklink.adoc index e52b3c2d77..e6b5bd959d 100644 --- a/modules/ROOT/partials/configuration/link_quicklink.adoc +++ b/modules/ROOT/partials/configuration/link_quicklink.adoc @@ -1,7 +1,13 @@ [[link_quicklink]] == `+link_quicklink+` -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. +This option changes the behaviour of the `+CTRL + K+` shortcut and the xref:link.adoc#mceLink[`+mceLink+`] command. + +When `+link_quicklink+` is set to `+false+`, pressing `+CTRL + K+` or executing the `+mceLink+` command will open the Link dialog. + +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 })+`. + +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. 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.