1

I am trying to create a button which inserts custom HTML into a rich text area.

So far I have added the button, and triggered an alert:

return "
    WysiHat.addButton('insert_slide_show', {
        label:         EE.rte.insert_slide_show.label,
        handler: function(editor)
        {
            alert("hello"); 
        }
    });
";

I have tried inner html:

this.innerHTML("<p>something</p>");

and jQuery html:

this.html("<p>something</p>")

both of which seem to submit the page, i suspect this is due to an error with the html.

I also looked threw the documents on this and still have no clue, any help would be appreciated.

So in summery I'm looking to insert custom html into a rich text area on a button click, using a custom rte button.

1 Answer 1

2

So after a little bit of rummaging around on the EE site and some intuition I found this:

this.Commands.insertHTML();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.