#177 Adding support for FormatBlock DIV in gecko

Version 2.x
closed-fixed
Editor (144)
5
2005-12-23
2005-11-15
No

currently Mozilla doesn't recognizes <DIV> as a valid
formatting block and in the FCKeditor it has been
hidden, but it's easy to make it work until a real
patch lands in Mozilla.

1st, in FCKToolbarFontFormatCombo.prototype.CreateItems
= function( targetSpecialCombo )
remove the lines that avoid adding the DIV to the list
in gecko:
// if ( aTags[i] == 'div' && FCKBrowserInfo.IsGecko )
// continue ;

2nd: add a special if for this case in
fck_othercommands.js:

FCKFormatBlockCommand.prototype.Execute = function(
formatName )
{
if ( formatName == null || formatName == '' )
FCK.ExecuteNamedCommand( 'FormatBlock', '<P>' ) ;
else {
if ( formatName == 'div' && FCKBrowserInfo.IsGecko )
FCK.ExecuteNamedCommand( 'FormatBlock', formatName ) ;
else
FCK.ExecuteNamedCommand( 'FormatBlock', '<' +
formatName + '>' ) ;
}
}

Discussion

  • Frederico Caldeira Knabben

    • assigned_to: nobody --> fredck
    • status: open --> open-fixed
     
  • Frederico Caldeira Knabben

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks