espenmn / modxMagicHoverLink

An ingenious way to use TinyMCE to do the infamous thing called, internal linking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modxMagicHoverLink.js

An ingenious way to use TinyMCE to do the infamous thing called, internal linking.

A replacement to the TinyMCE link plugin - For MODXers and all others.

While using pdoTools to populate link_list is great for backend/frontend, some users asked for a little backend magic that harnesses the existing power of MODX; then modxMagicHoverLink was born.

Hover over Resources in Resource Tree, MODX Manager search result, Link List (backend/frontend)

Full Markdown support for inserting links and images from file browser

Insert MODX internal links with scheme (abs, relative, http, https)

#Usage

tinymce.init({
  external_plugins: {
    modxMagicHoverLink: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/modxMagicHoverLink.js"
    //twExoticMarkdownEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twExoticMarkdownEditor.js" //works flawlessly with this plugin to output Markdown syntax
  },
  modxMagicHoverLinkSettings: {
    stripMODXurl:false, //default is true
    addClassToTree:false, //default is true
    markdownImagePersist:true //default is false
  },
  toolbar: "link unlink",
});

In TinymceWrapper, to affect all editors at once, call external_plugins: {... in your TinymceWrapperCommonCode chunk.
Or else, make the call in your individual init chunks.

About

An ingenious way to use TinyMCE to do the infamous thing called, internal linking

License:GNU General Public License v2.0


Languages

Language:JavaScript 100.0%