Hi,
short question:
is there a way to rerender/refresh the contents of an dialog window? It doesn't need to refresh when the window is still shown, rerendering the elements every time the dialog opens would be sufficient. Or is there an equivalent to onShow that is called before the ui elements are rendered?
long question:
I want to display several ui elements in an dialog window depending on the text in the ckeditor. To be more precise: I'm writing a plug-in that opens an dialog which lists all web-links that the user added in the ckeditor. A click on one of them opens the 'normal' link dialog window to edit them.
That worked fine, except that it only worked once. The plugin always showed the links which were there when the plugin was opened the first time, links that were added after that would not show up in the dialog window of my plugin.
So now, I'm using onShow in my dialog to add the elements dynamically with:
var linkContent = { type : 'html', id : 'test', html : '<div>just a test</div>' }; CKEDITOR.dialog.getCurrent().definition.getContents("tab1").add(linkContent);
It kinda seems to work:
CKEDITOR.dialog.getCurrent().definition.getContents("tab1").elements
lists the correct elements I added to the dialog. But in the dialog they are not displayed.
Is there a way/hack/workaround to get these elements to show?
Any help or hints would be really appreciated! Thanks for reading :)