I've created a plugin that allows you to use custom tags and use them in the editor. The idea is that these tags will be preprocessed by a php (or any other) script before they are actually displayed on the page. This particular file currently handles inclusion of videos from YouTube, Vimeo, and Czech Stream.cz. I've uploaded this file in the general "ckeditor 3" thread but I feel it rather belongs here.
The plugin now processes <youtube /> tags (works for vimeo and stream.cz as well) by default but you can create new optional tags by editing the config file (as of version 1.1).
The dialog currently relies on text fields only (I didn't need checkboxes so I didn't bother to include them yet) but in general, it works as expected.
To add an icon to the main menu, simply add 'youtube' to the toolbar definition in your config file.
To add a custom tag of your own, edit the config file (if you want to keep the youtube tag as well):
config.pubMeCustomTags = { youtube : { dtd : [ '$empty','$inline','$body','div' ] }, testtag : { dtd : [ '$empty','$inline','$body','div' ] } };
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: Custom tags (YouTube, Vimeo, Stream.cz)
2) extraPlugins : '_pubme_extratags', section
2)placed in proper location in toolbar and
3) kept the folder in in ckeditor/plugins .
Still i m unable to get this plugin . Is there anything else to be done ?
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Also note that the pugin name is _pubme_extratags (this comes to the config.extraPlugins) while the toolbar icon name is youtube. It is so because the plugin is actually designed for various extra tags to be processed (although at this very moment, it handles only youtube and other video formats).
Also note that if you use more extraPlugins, no spaces are allowed in the config.extraPlugins definition i.e. you must not put a space after the comma in the following:
The minimum config file should thus be:
Re: Custom tags (YouTube, Vimeo, Stream.cz)
hi,

i manage to get the youtube icon up on the toolbar. However when i try to insert a video. all i get is an image of the youtube. how am i able to get the video to play?
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Before displaying the page itself, you need to process the tag with php (or whatever programming language you use). The plugin description includes information on how to do it for the video formats mentioned in the heading of this thread.
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Your plugin is exactly what I needed : flexible and easy to use! Thank you very much
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Hi malis
I tried to use your plugin to handle some custom tags : <myvideo> & <mymusic> which aim at adding multimedia content.
So I wanted to set up a few tags :
Re: Custom tags (YouTube, Vimeo, Stream.cz)
Great plugin!
I'm using your (Leward) fix with 2 other tags and it works.
But when I switch from viewing the "source" and back, the icon changes back to "youtube"-icon..
The tag doesn't change, but when I click on it I'll get the youtube dialog..
What could be wrong?
Custom tags v 1.1
April 23, 2012 - v 1.1 - Plugin update and fix:
- Fixed: The first version was buggy if you tried to use it with more than 1 tag. This update fixes it.
- New: It adds a possibility of adding new tags from the config file - you do not need to edit the plugin itself at all. Just add a dialog script, some icons and register the new tag in the config file and that's it.
Download
_pubme_extratags_1_1.zip
PS: Sorry for taking so long, I had some higher-priority work to do. But better late than never, right?
Attachments:
Re: Custom tags (YouTube, Vimeo, Stream.cz)