Hi, in fckeditor i could say the following to insert html into the editor:
With ckeditor i have tried the same (insertHtml not InsertHtml) but it does nothing. If i try:
It works, so i'm guessing in ckeditor the insertHtml method parses the html for valid html. Is there an overload or an alternative method which would allow me to insert my own custom tag. This is requried because i later replace the youtube tag when i display the data.
Appreciate it if someone could help. Thanks
editor.InsertHtml('<youtube url="' + url + '" class="youTube">YouTube Video Place Marker</youtube>');With ckeditor i have tried the same (insertHtml not InsertHtml) but it does nothing. If i try:
editor.insertHtml('<p>YouTube Video Place Marker</p>');It works, so i'm guessing in ckeditor the insertHtml method parses the html for valid html. Is there an overload or an alternative method which would allow me to insert my own custom tag. This is requried because i later replace the youtube tag when i display the data.
Appreciate it if someone could help. Thanks

Re: insertHtml parses for valid html
editor.insertHtml('<cke:youtube url="' + url + '" class="youTube">YouTube Video Place Marker</cke:youtube>');Hope this helps.
Re: insertHtml parses for valid html
(function() { CKEDITOR.plugins.add('youtube', { requires: ['iframedialog', 'fakeobjects'], init: function(e) { CKEDITOR.dialog.addIframe('youtube_dialog', 'Insert YouTube Movie...', this.path + 'dialogs/youtube.html', 550, 200, function() { /*oniframeload*/ }); e.addCommand('youtube', { exec: function(c) { c.openDialog('youtube_dialog'); } }); e.ui.addButton('YouTube', { label: 'Insert YouTube Movie...', command: 'youtube', icon: this.path + 'images/icon.gif' }); e.addCss('img.cke_youtube {' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' + 'background-position: center center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + 'width: 80px;' + 'height: 80px;' + '}'); }, afterInit : function(e) { var dataProcessor = e.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter; if (dataFilter) { dataFilter.addRules({ elements: { 'cke:youtube': function(element) { return e.createFakeParserElement(element, 'cke_youtube', 'youtube', true); } } }, 5); } } }); })();This works perfectly when the user first clicks ok but if you switch to code view and then back to the wysiwyg view the image disappears. I also tested the flash plugin and that appears to be working correctly so i'm not sure what i'm doing wrong.
I'd really appreciate it if someone could help. Thanks
Re: insertHtml parses for valid html
Re: insertHtml parses for valid html