Hi all,
I'm trying to figure out how to get nested widgets working properly.
I've just upgraded to CKEditor 4.4.5 for that and it seems much better than it was with 4.3.
I still have an issue with the dowcast function.
When downcasting a widget, how can I call the downcast of nested widgets ?
Currently, when I downcast the main widget, I get in its content the upcasted representation of the nested widgets ...
Thank's for helping.
It should work out of the box
It should work out of the box in case of simple downcasting, when you don't modify the structure too much. Downcasting mechanism looks for 'data-cke-widget-editable' attribute which marks every nested editable. If it's found, the editable is downcasted what means replacing its HTML content with its output data. To get the data we use nestedEditable.getData() method what processes the content of nested editable and therefore downcast widgets that are there. So, if your downcast function will change the structure in a way that the nested editable element cannot be automatically discovered, then you need to do this step yourself.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Thank's for the reply !
Thank's for the reply !
I have just started to look in this part of the code, and I have found a clue on my issue, which is probably related to my code. The 'editableElement' is properly automatically downcasted, but ... it does not change the 'retElement'. I keep digging on that.
That works fine now.
That works fine now.
Here was the problem : I was replacing the editable element by its children in the downcast function.