bobbiedigital
Programmer
Hi
I have an rte which is essentially a text box and i want to create a text area above it which essentially changes to report a particular style.
For example say i have 3 lines of text each with a different font, the html code is :
<p style="font-family: Verdana;" <font size="2">text line 1</font></p>
<p style="font-family: Lucida Console;" align="left"><font size="2">text line 2</font></p>
<p align="left"><font size="2"><span style="font-family: Tahoma;">text line 3</font></p>
and say when the cursor clicks on to the text in the text box, i can get the textarea to fill with the style.
im thinking the way to do it would be to write a javascript function so onclick it gets the style, ive tried this but i know i need to place an id somewhere in one of the tags, but this is where i get stuck.
Does anyone have any ideas?
Thankyou for your help
Bobbie
I have an rte which is essentially a text box and i want to create a text area above it which essentially changes to report a particular style.
For example say i have 3 lines of text each with a different font, the html code is :
<p style="font-family: Verdana;" <font size="2">text line 1</font></p>
<p style="font-family: Lucida Console;" align="left"><font size="2">text line 2</font></p>
<p align="left"><font size="2"><span style="font-family: Tahoma;">text line 3</font></p>
and say when the cursor clicks on to the text in the text box, i can get the textarea to fill with the style.
im thinking the way to do it would be to write a javascript function so onclick it gets the style, ive tried this but i know i need to place an id somewhere in one of the tags, but this is where i get stuck.
Does anyone have any ideas?
Thankyou for your help
Bobbie