Hello all,
I've been searching on google for a few days now trying to figure out how to do something with a plugin I've been putting together.
I've created a drop down which allows users to select predefined formats for an online play by post roleplaying game over on dndorks.com.
What its meant to do is allow the user to select a paragraph of formatted HTML and surround it with predefined HTML. Its easy for the simple ones, I just use ApplyStyle, what I can't figure out is how to do something like.
<FIELDSET><LEGEND>OOC</LEGEND>
ContentHere
</FIELDSET>
It seemed to me that using the selection object to grab the html would be ideal, and I have something that uses selection.getrange.text and then puts it together with insertHTML, but the problem with the .text is it strips out the HTML.
SO...I'd love to hear from someone in the community either A) how to insert multiple tags of HTML around a selection or B) how to get the html from a selection and not just text or C) ...both?
Thanks all!
I've been searching on google for a few days now trying to figure out how to do something with a plugin I've been putting together.
I've created a drop down which allows users to select predefined formats for an online play by post roleplaying game over on dndorks.com.
What its meant to do is allow the user to select a paragraph of formatted HTML and surround it with predefined HTML. Its easy for the simple ones, I just use ApplyStyle, what I can't figure out is how to do something like.
<FIELDSET><LEGEND>OOC</LEGEND>
ContentHere
</FIELDSET>
It seemed to me that using the selection object to grab the html would be ideal, and I have something that uses selection.getrange.text and then puts it together with insertHTML, but the problem with the .text is it strips out the HTML.
SO...I'd love to hear from someone in the community either A) how to insert multiple tags of HTML around a selection or B) how to get the html from a selection and not just text or C) ...both?
Thanks all!