Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions modules/ROOT/partials/commands/link-cmds.adoc
Original file line number Diff line number Diff line change
@@ -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 });
----
8 changes: 7 additions & 1 deletion modules/ROOT/partials/configuration/link_quicklink.adoc
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Loading