I got it working fine but I now want to dynamically add new text to the component in my php script. I know how to setup the php part to initiate the new text load event but I can't figure out how to actually get the new text into the RTE component inside a JS function.

I tried this JS function but it didn't load in the new text in:

function pre_canned_message_click()
{
rte1.html = 'New string';
}

In the demo.php below the RTE component is loaded the same way rte1.html = but in the JS function it doesn't work. I don't know what I'm missing here.