Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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 });
----
6 changes: 5 additions & 1 deletion modules/ROOT/partials/configuration/link_quicklink.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[[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. By default, pressing `+CTRL + K+` or executing the `+mceLink+` command opens the Link dialog. If `+link_quicklink+` is set to `+true+`, pressing `+CTRL + K+` will, by default, open the link context toolbar instead.

Even when `+link_quicklink+` is set to `+true+`, the full Link dialog can still be invoked by running `+tinymce.activeEditor.execCommand('mceLink', false, { dialog: true });+`.

If the cursor is within an existing link, the context toolbar contains fields for modifying, removing and opening the selected link. If not, the context toolbar allows for the quick insertion of 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