I would like to override the markup generated when a file (pdf in this case) is dropped into the TinyMCE editor. as I would like to add some extra properties to the markup which are present on the file itself.
the PdfFile type is a expandsion on the MediaData class, with things like filesize and title.
currently it generates this:
<p><a title="some-pdf.pdf" href="some-pdf.pdf">some pdf</a></p>
I would like something more like:
<p><a title="pdfTitle" href="some-pdf.pdf" data-some-attribute="pdfTitle">some pdf (PdfFileSize)</a></p>
I am unsure as to
I know when the file is dropped into the editor, it calls an ajax method, which returns the markup /EPiServer/cms/Stores/contentdata/contentId_workID but that is about it
I think you can use Patrick article for a starting point and then do whatever you want
thanks Ravindra, I had a go with that, but it doesnt deal with 'templating' the new TinyMCE content, or how to avoid being limited by the
Which very much limits the markup that can be dumped out, as anything that is returned by the rest store at that point is ignored if it is not url/text (for create link) and similr for createContentBlock. I can make a tinyMCE plugin and check for the type of a dropped element, going to the rest store at that point to get the extra properties render as I need. But that avoids pretty much everything in Patricks article, and seems pretty hacky.
maybe I am missing something