Just as background I'm using the jquery adapter in an ajax environment where DOM elements are created and destroyed constantly with varying element types for editing fields of what ends up being a PDF flyer.
The issue I'm running into is the re-usability of the CKEditor in this situation. An input field element may have the same name as some other element at some point in time (not at the same point in time as not actually have DOM name matching conflicts). The problem is it seems CKEditor is trying to maintain these connections.
Which causes the first error thrown that 'some element name' already exists. I get it, it forces me to go and make sure the instance was removed which is good practice, so to fix this I tried to first use .ckeditorGet() (to either be able to get the last instance of CKEditor and destroy it and move on to re-initialize the element) which I expected to return false or the object, instead if the object dosn't exist it throws an error...
The problem is firstly...in the normal use, how many other errors are thrown that I have to check for, and secondly, why in this case does the error have to actually be caught? It seems like the world should not end because it wasn't initialized. I'm modifying my adapter to handle this but I strongly suggest this be the norm for the jQuery Adapter as it is extremely uncommon to have to use try catches for minor issues such as this case where a simple FALSE/NULL/undefined would suffice.
Others wise a great product and tool, and so far has been very easy to setup, seems to just be a re-usability issue i've run into.
Thanks,
Thaddaeus
The issue I'm running into is the re-usability of the CKEditor in this situation. An input field element may have the same name as some other element at some point in time (not at the same point in time as not actually have DOM name matching conflicts). The problem is it seems CKEditor is trying to maintain these connections.
Which causes the first error thrown that 'some element name' already exists. I get it, it forces me to go and make sure the instance was removed which is good practice, so to fix this I tried to first use .ckeditorGet() (to either be able to get the last instance of CKEditor and destroy it and move on to re-initialize the element) which I expected to return false or the object, instead if the object dosn't exist it throws an error...
The problem is firstly...in the normal use, how many other errors are thrown that I have to check for, and secondly, why in this case does the error have to actually be caught? It seems like the world should not end because it wasn't initialized. I'm modifying my adapter to handle this but I strongly suggest this be the norm for the jQuery Adapter as it is extremely uncommon to have to use try catches for minor issues such as this case where a simple FALSE/NULL/undefined would suffice.
Others wise a great product and tool, and so far has been very easy to setup, seems to just be a re-usability issue i've run into.
Thanks,
Thaddaeus
Re: jQuery Adapter Modifcation Request
Re: jQuery Adapter Modifcation Request