Skip to content

Commit

Permalink
Include ability to add the insert image and insert link in the insert…
Browse files Browse the repository at this point in the history
… menu
  • Loading branch information
frapell committed Sep 15, 2023
1 parent c0f0be6 commit e2213d4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/pat/tinymce/js/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ tinymce.PluginManager.add("ploneimage", function (editor) {
onAction: editor.settings.addImageClicked,
// stateSelector: "img:not([data-mce-object])",
});
editor.ui.registry.addMenuItem("ploneimage", {
icon: "image",
text: "Insert image",
onAction: editor.settings.addImageClicked,
// stateSelector: "img:not([data-mce-object])",
});
});

/* register the tinymce plugin */
Expand All @@ -363,6 +369,13 @@ tinymce.PluginManager.add("plonelink", function (editor) {
onAction: editor.settings.addLinkClicked,
stateSelector: "a[href]",
});
editor.ui.registry.addMenuItem("plonelink", {
icon: "link",
text: "Insert link",
shortcut: "Ctrl+K",
onAction: editor.settings.addLinkClicked,
stateSelector: "a[href]",
});

editor.ui.registry.addButton("unlink", {
icon: "unlink",
Expand Down

0 comments on commit e2213d4

Please sign in to comment.