[wp-hackers] Problem with custom TinyMCE button

Karl Wångstedt kalle at wangstedt.net
Sat Feb 7 22:38:42 GMT 2009


6 feb 2009 kl. 13.11 skrev Andrew Ozz:

> Looking at the function there are couple of things:

Supergreat! Thank you.

I did as you said, and used the replace method instead. The insertion  
now looks like:

var kewvalue = ed.selection.getContent({format : 'text'});
var e = ed.dom.getParent(ed.selection.getNode(), 'A');
var kewuri = ed.dom.getAttrib(e, 'href');
e.replace('<p class="align02"><video src="'+kewuri+'"  
controls="true"><a href="'+kewuri+'">'+kewvalue+'</a></video></p>',  
'A');

This works, and I hope I do as I am supposed to do.

Sincerely
Karl Wångstedt
----------------------------------
          Wångstedt  nova
         www.wangstedt.net

Karl Wångstedt       0278-61 12 33
Stenhuggarvägen 3g   070-578 13 04
821 41  BOLLNÄS
----------------------------------
Det här brevet skickades med en Macintosh från Apple.
Garanterat virusfri med Mac OS X.


More information about the wp-hackers mailing list