id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
6687,empty tag should be removed on inline-style format,yiminghe,Garry Yao,"example:
{{{
^测试$
}}}
^ indicates start selection position and $ indicates end selection position.
when apply inline-style format such as change to 48px , now the code generated is (use firebug pls)
{{{
{{{
测试
}}}
}}}
it should be : (no empty style tag)
{{{
测试
}}}
i fix it :
in 3.4.2/_source/plugins/styles/plugin.js line 449 ,add following code :
{{{
var validNextSilbing = includedNode.getNext(function(node) {
return !node.getAttribute || !node.getAttribute(""_cke_bookmark"");
});
while ( !validNextSilbing
&& ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
&& ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
&& ( !def.childRule || def.childRule( parentNode ) ) )
{
includedNode = parentNode;
}
}}}
in summary ,we should ignore bookmark and include parent node in style range.
",Bug,closed,Low,CKEditor 3.5.1,Core : Styles,3.4.2,fixed,,