Vanq69
asked on
Applying bold or italic or underline to a selection in a text area
Hi,
I was wondering if it is possible to have an area of selected text be made bold (or italic/underline - i only need 1 but all 3 would be great) and then stored in a SQL database using a escape() string over AJAX.
Currently I have a from which calls a javascript function which then AJAX's an escape() string (to keep whitespaces).
I would like to be able to display the bold in 3 ways:
1. In the text area itself as it is being made (happy for this to be in tag form)
2. In the textarea when recalled for editing (again happy for this to be in tag form)
3. As actual bold text when displayed in a standard HTML page as I display my current output, simply as a paragraph.
I am not looking for a WYSIWYG style editor or anything like that, simply the option to add bold. If there is an easy way to size as well that would be great but a bonus.
I was wondering if it is possible to have an area of selected text be made bold (or italic/underline - i only need 1 but all 3 would be great) and then stored in a SQL database using a escape() string over AJAX.
Currently I have a from which calls a javascript function which then AJAX's an escape() string (to keep whitespaces).
I would like to be able to display the bold in 3 ways:
1. In the text area itself as it is being made (happy for this to be in tag form)
2. In the textarea when recalled for editing (again happy for this to be in tag form)
3. As actual bold text when displayed in a standard HTML page as I display my current output, simply as a paragraph.
I am not looking for a WYSIWYG style editor or anything like that, simply the option to add bold. If there is an easy way to size as well that would be great but a bonus.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brilliant assistance with working example.
No Problem. The credit should also go to the person in this forum http://forums.devshed.com/javascript-development-115/textarea-bold-on-selected-area-512438.html. This is where I found the solution.
ASKER
Really is a credit when people are able to be so helpful.
Thank you.