Changeset 1378 for trunk/XinhaCore.js


Ignore:
Timestamp:
02/06/18 11:47:27 (8 months ago)
Author:
gogo
Message:

Add improved and standardised tab handling support for Gecko and WebKit?, configurable by the tabSpanClass and tabSpanContents options.

Hitting tab will insert a span with the given class and contents, hitting more than once will insert nested tab spans, hitting shift-tab will remove the current tab span if you are in one, do nothing otherwise.

tested in FF and Chrome, it seems to work well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r1376 r1378  
    770770   */ 
    771771  this.specialReplacements = {}; //{ 'html_string' : 'wysiwyg_string' } 
     772   
     773  /** When the user presses the Tab in the editor, Xinha will insert a span. 
     774   *  with the given class and contents. 
     775   *  
     776   *  You can set tabSpanClass to false to disable this function, in which 
     777   *    case tabs will be disabled in Xinha (except for in lists if you load  
     778   *    the ListOperations plugin. 
     779   */ 
     780   
     781  this.tabSpanClass    = 'xinha-tab'; 
     782  this.tabSpanContents = '    '; 
    772783   
    773784  /** A filter function for the HTML used inside the editor<br /> 
Note: See TracChangeset for help on using the changeset viewer.