What I'm looking for is to be able to create mutliple instances on the fly.
Basically my CMS is to have repeatable regions, which can be created or removed per page.
So I have a fieldset with all editable regions within it, this fieldset gets cloned and inserted (after the last fieldset). The attributes of any inputs / textareas get re-written with the next increment ID (based on their position in the parent fieldset that the child fieldset with these inputs resides)
This method works well and I can process all the data accordingly (all stored in MySQL in a format that can allow me to easily recreate the data as XML)
Now the real issue is of course, when I clone wymEditor, it's not going to pan out very well. To the DOM it's a perfect clone and functionally the editor works fine. However when saving, it's not going to grab any information as any fields & elements relating to the new instance are 'bad' clones (and are really breaking the rules of the doc type e.g. duplicate ID's)
I basically need to
1) increment the # of instances of wym (removing instances doesn't seem to be a problem, although I suppose it could)
2) clear the content in the new instance
3) fix the attributes of the new instance
What I would -really- appreciate is a few pointers to get me started, what should I be looking for and what I should avoid.
Many thanks in advance
-grokCore-
Never underestimate the power of human stupidity.
Robert A. Heinlein