Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • umbracouser4711 1 post 71 karma points
    Jul 08, 2020 @ 15:00
    umbracouser4711
    0

    Add TinyMCE Plugin to existing rich text editors in Umbraco Backend

    Hello dear community,

    is it possible to install a specific plugin for the TinyMCE editor without creating a new plugin for a datatype in Umbraco? So, can I just "attach" such a TinyMCE Plugin in the Umbraco backend without, of course, changing the Umbraco source code?

    Thank you very much for your replies!

  • Steve Morgan 1346 posts 4453 karma points c-trib
    Jul 08, 2020 @ 15:34
    Steve Morgan
    0

    Hi,

    I create tinymce plugins using this as a simple example:

    https://gist.github.com/sillybean/68d53b9b729804737e9d9774bc1d0a60

    Add a folder (in my case "purchasebutton" in \umbraco\lib\tinymce

    Create a file called index.js

     // Exports the "purchasebutton" plugin for usage with module loaders
    require('./plugin.js');
    

    Then two files, plugin.js and plugin.min.js with that code from the gist. Change blockquote_cite to the name of your plugin in the gist.

    Then in the /config/tinyMceConfig.config add the command under the nceCharMap and it should appear as an option in your Rich text editor data type (remember you have to allow it and also remember to do a hard, cache busting refresh in Umbraco).

    This works for me but I think that gist is a bit old.

    There's more detail (with a more modern example) here https://our.umbraco.com/Documentation/Reference/Config/tinyMceConfig/#common-custom-configuration-examples

Please Sign in or register to post replies

Write your reply to:

Draft