#213·pell

Suggestion: allow the custom action icon to be a function

Author: meduzapatCreated Apr 12, 2021Updated Apr 12, 2021

Amazing work ! Just a little suggestion: action.icon<string| function> (optional if overwriting, required if custom action) If the icon element is a string or is null do the normal way, but if is a function use the return string as element

that way we can create custom buttons, like a color picker I am doing this right now:

{
    icon: '<input type="color" class="pell-button" onchange="document.execCommand(\'backColor\', false, this.value);"/>',
    title: 'Change Background Color',
    result: () => true
},

this works fine but is a nasty workaround (input inside button).