Hi,
I'm having a problem with inserting custom data in inline CKEditor instances.
So, here: http://ckeditor.com/latest/samples/inlineall.html after I click on any editable element I'd like to ask the API for content for this element and put it in the editor instead of using the text from the page. So I want to do something like that (this is pseudocode):
CKEDITOR.on('userClickedOnInlineEditorAndItActivated', function(e) {
var content = [get the content, e.g. with $.get];
e.editor.setData(content);
});
The reason for that is that in the CMS we have
Hello {{ user.name }}!
But the rendered content is something like
Hello Jan!
And obviously I'd like to keep the user.name variable in the edited content, hence the need for loading it from API rather than using the rendered version.
So, is there any easy way to do that? .setData doesn't work for me as it fires immediately after the page is rendered for all inline editors which also changes the content on the page.
thanks! Jan
I still can't find the
I still can't find the solution. Anyone could help me?
thanks!
Jan