JavaScript Help..

Shadow121

Member
Messages
901
Reaction score
0
Points
16
Alright I would like to create a custom WYSIWYG editor and I was wondering if there is a way for JavaScript to search a page for textarea tags then replace them with a say... table with 2 tr's and one of which contains a TD with the different buttons, then the other TR contains the TD with the textarea.
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
Absolutely. You can load the infomation of the body into a variable using the var x = document.getElementsByTagName("body")[0].innerHTML; statement and search it appropriately. Use the http://w3schools.com/jsref/jsref_obj_string.asp reference to find the methods to search the body and then apply the changes.
 
Top