~ubuntu-branches/ubuntu/gutsy/moin/gutsy

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/_source/commandclasses/fck_othercommands.js

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-02-14 16:09:24 UTC
  • mfrom: (0.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20060214160924-fyrx3gvknzqvt4vj
Tags: 1.5.2-1ubuntu1
Drop python2.3 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
{
116
116
        if ( formatName == null || formatName == '' )
117
117
                FCK.ExecuteNamedCommand( 'FormatBlock', '<P>' ) ;
 
118
        else if ( formatName == 'div' && FCKBrowserInfo.IsGecko )
 
119
                FCK.ExecuteNamedCommand( 'FormatBlock', 'div' ) ;
118
120
        else
119
121
                FCK.ExecuteNamedCommand( 'FormatBlock', '<' + formatName + '>' ) ;
120
122
}
252
254
                return ( FCKUndo.CheckRedoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
253
255
        else
254
256
                return FCK.GetNamedCommandState( 'Redo' ) ;
 
257
}
 
258
 
 
259
// ### Page Break
 
260
var FCKPageBreakCommand = function()
 
261
{
 
262
        this.Name = 'PageBreak' ;
 
263
}
 
264
 
 
265
FCKPageBreakCommand.prototype.Execute = function()
 
266
{
 
267
//      var e = FCK.EditorDocument.createElement( 'CENTER' ) ;
 
268
//      e.style.pageBreakAfter = 'always' ;
 
269
 
 
270
        // Tidy was removing the empty CENTER tags, so the following solution has 
 
271
        // been found. It also validates correctly as XHTML 1.0 Strict.
 
272
        var e = FCK.EditorDocument.createElement( 'DIV' ) ;
 
273
        e.style.pageBreakAfter = 'always' ;
 
274
        e.innerHTML = '<span style="DISPLAY:none">&nbsp;</span>' ;
 
275
        
 
276
        var oFakeImage = FCKDocumentProcessors_CreateFakeImage( 'FCK__PageBreak', e ) ;
 
277
        oFakeImage      = FCK.InsertElement( oFakeImage ) ;
 
278
}
 
279
 
 
280
FCKPageBreakCommand.prototype.GetState = function()
 
281
{
 
282
        return 0 ; // FCK_TRISTATE_OFF
255
283
}
 
 
b'\\ No newline at end of file'