C
colinhumber
There are two scenarios I'm having trouble with:
1) If I have a string that includes both text and controls, such as
"This is some text <BUTTON>Click me</BUTTON>", and I want to bold the
text using execCommand as well as add the appropriate formatting tags
around the button control, so it would look like this:
<STRONG>This is some text</STRONG><STRONG><BUTTON>Click
me</BUTTON></STRONG>
How would I do that? Ideally, I'd also like the "Click me" to be
formatted as well.
2) I select a button control, <BUTTON>Click me</BUTTON>, and I want to
format this using execCommand so it would add the tags around the
BUTTON tags as above, how would I do that? In this case as well I'd
like the button text to be formatted as well.
Thanks in advance.
1) If I have a string that includes both text and controls, such as
"This is some text <BUTTON>Click me</BUTTON>", and I want to bold the
text using execCommand as well as add the appropriate formatting tags
around the button control, so it would look like this:
<STRONG>This is some text</STRONG><STRONG><BUTTON>Click
me</BUTTON></STRONG>
How would I do that? Ideally, I'd also like the "Click me" to be
formatted as well.
2) I select a button control, <BUTTON>Click me</BUTTON>, and I want to
format this using execCommand so it would add the tags around the
BUTTON tags as above, how would I do that? In this case as well I'd
like the button text to be formatted as well.
Thanks in advance.