Hi there!
I am trying to implement a new plugin.
The plugin should only insert a new xml-construct like
My site is using this xml to load the related player and sources... this works well... now i want to create a plugin which you can edit this media-tag.
Does anybody dealt with something like that before and/or having any hints and tipps?
First i want to display the xml with my own image, according to the flash-function... but i'm going crazy...
I tried a lot of things, but nothing works...
according to the placeholder-plugin, i tried something like:
didnt work...
then i tried something like:
but, there is a JS-Error: FCKDocumentProcessor.addItem is not a function...
Please help...
I am trying to implement a new plugin.
The plugin should only insert a new xml-construct like
<media type="video"> <param name="url">video/video1.avi</param> </media>
My site is using this xml to load the related player and sources... this works well... now i want to create a plugin which you can edit this media-tag.
Does anybody dealt with something like that before and/or having any hints and tipps?
First i want to display the xml with my own image, according to the flash-function... but i'm going crazy...
I tried a lot of things, but nothing works...
according to the placeholder-plugin, i tried something like:
FCKXHtml.TagProcessors['media'] = function( node, htmlNode ) { if ( htmlNode.url ) node = FCKXHtml.XML.createTextNode( '[[' + htmlNode.url+ ']]' ) ; else FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; return node ; }
didnt work...
then i tried something like:
var FCKMediaProcessor = new Object(); FCKMediaProcessor.ProcessDocument = function(A) { var B = A.getElementsByTagName('MEDIA'); var C; var i = B.length - 1; while (i >= 0 && (C = B[i--])) { var D = C.cloneNode(true); D.setAttribute('load', C.getAttribute('url')); var E = FCKDocumentProcessors_CreateFakeImage('FCK__MYMEDIA', D); E.setAttribute('_fckmymedia', 'true', 0); FCKMediaProcessor.RefreshView(E, C); C.parentNode.insertBefore(E, C); C.parentNode.removeChild(C); }; }; FCKMediaProcessor.RefreshView = function(A, B) { if (B.width > 0) A.style.width = FCKTools.ConvertHtmlSizeToStyle(B.width); if (B.height > 0) A.style.height = FCKTools.ConvertHtmlSizeToStyle(B.height); }; FCKDocumentProcessor.addItem(FCKMediaProcessor );
but, there is a JS-Error: FCKDocumentProcessor.addItem is not a function...
Please help...
Re: Plugin with own xml-tag
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn