Copied to clipboard

Flag this post as spam?

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


  • mauzilla 19 posts 90 karma points
    Oct 25, 2023 @ 12:44
    mauzilla
    0

    Adding custom button with markup to tinyMCE / richtexteditor

    I need to add a custom button to the tinyMCE / richtexteditor.

    From what I can gather, this can be done with TinyMCE with the following code (not the entire code, just a part of it), I am just not sure where I should add this? I see config can be specified in the appsettings.json, but it does not seem to cater for custom buttons:

    setup: function (editor) {
        editor.ui.registry.addButton('customInsertButton', {
          text: 'CustomList',
          onAction: function (_) {
            editor.insertContent('&nbsp;<ul class="custom-list"><li>item</li></ul>&nbsp;');
          }
        });
    
  • Amalie Wowern 144 posts 273 karma points c-trib
    Oct 26, 2023 @ 08:03
    Amalie Wowern
    0

    Hi Have you seen this post https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/71490-custom-button-at-tinymce

    I would think the answer could be used in this context

    But be aware that it would probably be overwritten if you upgrade

Please Sign in or register to post replies

Write your reply to:

Draft