Copied to clipboard

Flag this post as spam?

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


  • Ben Dickman 19 posts 101 karma points
    20 days ago
    Ben Dickman
    0

    TinyMCE custom button to insert HTML

    Hi,

    I am wanting to add a custom button to the TinyMCE RTE that inserts HTML, based on the following example:

    tinymce.init({
      selector: 'textarea#custom-toolbar-button',
      toolbar: 'customInsertButton customDateButton',
      setup: function (editor) {
    
        editor.ui.registry.addButton('customInsertButton', {
          text: 'My Button',
          onAction: function (_) {
            editor.insertContent('&nbsp;<strong>It\'s my button!</strong>&nbsp;');
          }
        });
      }
    });
    

    https://www.tiny.cloud/docs/demo/custom-toolbar-button/#

    My issue is, how do I achieve this in Umbraco 13 using the appSettings.json?

    Any ideas would be much appreciated.

    Thanks,

    Ben

Please Sign in or register to post replies

Write your reply to:

Draft