I would like to create a plugin for CKEditor which displays a fake element in the editor and then when the html is requested the real element is returned. This is exactly what the Flash plugin does, and I have copied that method and it works. Great! But...
The issue is that I really don't want to use an img element as the fake element in the editor. When you call createFakeElement it creates an img element and stores the real element in the data-cke-element attribute. I want to provide my own HTML that will be displayed in the CKEditor and then replace that with different HTML when it is requested from CKEditor.
Has anyone attempted this? Possibly using a combination of dataFilter and htmlFilter? Would the new ACF in 4.1 be appropriate?
[It may help to know what I am trying to achieve. I am creating a dialog where I can choose a question type, set total marks allowed, model answer, etc. This is saved to a database (ASP.NET MVC). In CKEditor I want to display the question and appropriate inputs for the answer. When the HTML is requested from CKEditor I want to replace this with the code to call this question from the database (this is actually Razor code).]
Many thanks,
Simon