I'm trying to figure out how to insert an non HTML tag into the editor with a placeholder image. I was able to do the initial insert without any issues. However, whenever I switch to source and back or when the editor loads with the non HTML tag already in it, the placeholder image doesn't show.
I looked at the flash and link plugins to get an idea of how it should work, but even replicating it exactly is not working. The first tag I am trying to create is called cf_displayfeed. The code of the plugin is below:
Anyone have an idea of why this may not be working? I'm assuming the issue is specifically because of the non HTML tag.
Thanks
I looked at the flash and link plugins to get an idea of how it should work, but even replicating it exactly is not working. The first tag I am trying to create is called cf_displayfeed. The code of the plugin is below:
CKEDITOR.plugins.add('cf_displayfeed',{
requires: ['fakeobjects' ],
init:function(a){
a.addCss(
'img.cke_cf_displayfeed' +
'{' +
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/AddCatalogItem.gif' ) + ');' +
'background-position: center center;' +
'background-repeat: no-repeat;' +
'border: 1px solid #a9a9a9;' +
'width: 40px;' +
'height: 40px;' +
'}'
);
var cmd = a.addCommand('cf_displayfeed', {exec:catalog_onclick})
//cmd.modes={wysiwyg:1}
cmd.canUndo=false
a.ui.addButton('cf_displayfeed',{ label:'Insert Catalog Link', command:'cf_displayfeed', icon:this.path+'images/AddCatalogItem.gif' })
},
afterInit : function( editor )
{
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter;
if ( dataFilter )
{
dataFilter.addRules(
{
elements :
{
'cke:cf_displayfeed' : function( element )
{
return editor.createFakeParserElement( element, 'cke_cf_displayfeed', 'cf_displayfeed', false);
}
}
},
5);
}
}
})
function catalog_onclick(e)
{
window.open('/Components/CatalogLinks.cfm?Action=Add',"","HEIGHT=600,WIDTH=800,left=50,top=50, scrollbars,menubar,alwaysraised,resizable=1");
}
Anyone have an idea of why this may not be working? I'm assuming the issue is specifically because of the non HTML tag.
Thanks

Re: Using FakeObjects with non HTML tags
Re: Using FakeObjects with non HTML tags