danielleDee
Programmer
Hi All
I need to do the following in javascript:
I have a text field with a "format" button. When the button is clicked a
popup opens with say 3 checkbox options: paragraph, bold, underline. The user can then enter
text in the text box and apply formatting to the text entered. When the popup results are submitted, it should be displayed in the textbox as something like this:
<p><b>bold</b> text here </p>
By default <p> should come before <b> and <b> should come before <u> and </u></b></p> should come after the entered text.
I figured out how to populate a text box by clicking a button, but the values are all either added AFTER text or overwrites the text.
It would also help if the attributes could be added at CURSOR point with the click of a button or applied only to highlighted text.
Anyone have an idea how to apply this?
Thanx!
I need to do the following in javascript:
I have a text field with a "format" button. When the button is clicked a
popup opens with say 3 checkbox options: paragraph, bold, underline. The user can then enter
text in the text box and apply formatting to the text entered. When the popup results are submitted, it should be displayed in the textbox as something like this:
<p><b>bold</b> text here </p>
By default <p> should come before <b> and <b> should come before <u> and </u></b></p> should come after the entered text.
I figured out how to populate a text box by clicking a button, but the values are all either added AFTER text or overwrites the text.
It would also help if the attributes could be added at CURSOR point with the click of a button or applied only to highlighted text.
Anyone have an idea how to apply this?
Thanx!