Hello,
I am using a content management system which I do not want to change, so I want to cover all changes in the html templates.
The textarea attributes are rendered by the CMS, so I don't want to change them, therefore I just want to replace all existing textareas with FCKeditor-textareas.
This method is of course described in the docs, but you have to add an id to each textbox:
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
How can I achieve the same effect without having to add an id= and keep the existing "name="?
Thanks!
I am using a content management system which I do not want to change, so I want to cover all changes in the html templates.
The textarea attributes are rendered by the CMS, so I don't want to change them, therefore I just want to replace all existing textareas with FCKeditor-textareas.
This method is of course described in the docs, but you have to add an id to each textbox:
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
How can I achieve the same effect without having to add an id= and keep the existing "name="?
Thanks!
RE: Replacing all existing textareas - without ID
You can (in the DOM) have a different name to ID...
The best thing to do is loop through all of the textareas and create a FCK editor for each based on its name - setting the name to the new instance - but just before - deleting the textarea
This will give you hidden input fields that would essentially have the same name and ID as the original text boxes.
Hope that helps
Stu