Hello
I'm developing youtube plugin for two different variants of editor:
1. for administrators of site (it allows any html)
2. for users (users have to use BBCode)
In youtube plugin I add some custom rules in dataProcessor for creating fakeElement in place of youtube movies:
/ckeditor/plugins/youtube/plugin.js
And in BBCode plugin i create my own dataProcessor and set it to editor
Youtube plugin is added strictly after BBCode, so youtube dataFilter rules are added into my custom dataProcessor.
So, the problem is: Youtube dataFilter rules doesnt work together with BBCode plugin: instead of my custom youtube fakeelement i see real youtube preview of a movie.
What am i doing wrong? Is there any way to combine both plugins?
I'm developing youtube plugin for two different variants of editor:
1. for administrators of site (it allows any html)
2. for users (users have to use BBCode)
In youtube plugin I add some custom rules in dataProcessor for creating fakeElement in place of youtube movies:
/ckeditor/plugins/youtube/plugin.js
afterInit : function( editor )
{
var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter;
if ( dataFilter )
{
dataFilter.addRules(
{
elements :
{
'cke:object' : function( element )
{
// here i return null or createFakeElement( editor, element ); depending on values of src param inside object tag
}
}
},
1);
}
}
And in BBCode plugin i create my own dataProcessor and set it to editor
Youtube plugin is added strictly after BBCode, so youtube dataFilter rules are added into my custom dataProcessor.
So, the problem is: Youtube dataFilter rules doesnt work together with BBCode plugin: instead of my custom youtube fakeelement i see real youtube preview of a movie.
What am i doing wrong? Is there any way to combine both plugins?

Re: custom rules for custom dataProcessor