Changes between Version 1 and Version 2 of Documentation/NewbieGuide/ConfigurationOptions


Ignore:
Timestamp:
03/15/18 08:26:26 (6 months ago)
Author:
gogo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/NewbieGuide/ConfigurationOptions

    v1 v2  
    126126    Makes the Xinha edited content "how now yellow camel" be written into the textarea as "how now brown cow". 
    127127 
    128  
     128  autoFocus:: 
     129    Boolean. Automatically focus and activate the Xinha editor when the page is loaded.  Not recommended for multiple editors on a page.  Default false. 
     130 
     131  killWordOnPaste:: 
     132    Boolean.  When pasting using the toolbar paste button, automatically kill word code in the paste.  Due to browser security restrictions which prevent the toolbar paste button from being displayed, this usually is not of much use.  Default true. 
     133 
     134  makeLinkShowsTarget:: 
     135    Boolean.  Allow setting the `target=""` attribute in the default link creation dialog.  Default true. 
     136 
     137  charSet:: 
     138    String.  Character set to use.  Default same as the character set of the page including Xinha (not necessarily the page Xinha is editing).  It is highly recommended in the modern age to use UTF-8 character set for EVERYTHING on your website and in your database, if everything is always in UTF-8 you don't have character conversion problems. 
     139 
     140  browserQuirksMode:: 
     141    Boolean|null.  True, render the document being edited in in quirks mode.  False, render the document being edited in standards mode.  Null (default), render the document in the same mode as the page including Xinha. 
     142 
     143  htmlRemoveTags:: 
     144    RegExp|null.  Set to a regular expression matching tags to remove these entirely from the edited content.   Default null. 
     145    {{{ 
     146      xinha_config.htmlRemoveTags = /span|font/; 
     147    }}} 
     148    Removes all span and font tags. 
     149 
     150  flowToolbars:: 
     151    Boolean.  Allow toolbars to flow to fit the width of the editor better.  Default true. 
     152 
     153  toolbarAlign:: 
     154    String 'left'|'right'. Align the buttons left or right on the toolbar.  Default 'left'. 
     155 
     156  showFontStylesInToolbar:: 
     157    Boolean.  ** Superceeded by the FancySelects plugin. **  Display the names of fonts in the font itself in the select drop down (browser support patchy, use FancySelects instead if you can).  Default false. 
     158 
     159  showLoading:: 
     160    Boolean.  Show a panel over the textarea indicating the loading status during the booting process of Xinha.  Default false, however when using XinhaEasy.js or XinhaLoader.js this will typically be enabled anyway. 
     161 
     162  stripScripts:: 
     163    Boolean.  Strip scripts from the HTML output - this only works with DOMwalk (see getHtmlMethod above) and is ignored if you use the PreserveScripts plugin.  Default true. 
     164 
     165  convertUrlsToLinks:: 
     166    Boolean.  When a user types in a url in the WYSIWYG view, automatically convert it to an html link.  Default true. 
     167 
     168  hideObjectsBehindDialogs:: 
     169    Boolean.  Set to true to hide media objects when a div-type dialog box is open, to prevent show-through.  Default false. This probably isn't all that relevant in the modern age since object elements are seldom used. 
     170 
     171  colorPickerCellSize:: 
     172    CSS length element.  Size of each cell in the colour picker.  Default 6px 
     173 
     174  colorPickerGranularity:: 
     175    Integer.  Set to a higher number to allow more precise colours to be picked.  Default 18. 
     176 
     177  colorPickerPosition:: 
     178    String.  Set the position of the colour picker relative to it's button, a strig consisting of two words from  top, bottom, left and right separated by a comma.  Default 'bottom,right'. 
     179 
     180  colorPickerWebSafe:: 
     181    Boolean.  Restrict colours to the 256 "web safe" colours.  In the modern age, this is pretty redundant. Default false. 
     182 
     183  colorPickerSaveColors:: 
     184    Integer.  Number of recent colours to remember.  Default 20. 
     185 
     186  fullScreen:: 
     187    Boolean.  Start the editor in full screen mode.  Default false. 
     188 
     189  fullScreenMargins:: 
     190    Array [top, right, bottom, left ].  The margins in pixels to set when the editor is expanded to full screen.  Default [0,0,0,0] 
     191 
     192  fullScreenSizeDownMethod:: 
     193    String 'initSize'|'restore'.  When you exit full screen mode, will Xinha go back to the initial size, or the last size it was.  Default 'initSize' 
     194 
     195  toolbar:: 
     196    Multi Dimensional Array.  See ToolBarSpecification 
     197 
     198  fontname:: 
     199    Object.  The font families to provide in the drop-down select. 
     200    {{{ 
     201xinha_config.fontname =  
     202  { 
     203    "— font —": "", // — is mdash 
     204    "Arial"           : 'arial,helvetica,sans-serif', 
     205    "Courier New"     : 'courier new,courier,monospace', 
     206    "Georgia"         : 'georgia,times new roman,times,serif', 
     207    "Tahoma"          : 'tahoma,arial,helvetica,sans-serif', 
     208    "Times New Roman" : 'times new roman,times,serif', 
     209    "Verdana"         : 'verdana,arial,helvetica,sans-serif', 
     210    "Impact"          : 'impact', 
     211    "WingDings"       : 'wingdings'  
     212  } 
     213}}} 
     214 
     215  fontsize:: 
     216    Object.  The font sizes to provide in the drop down select. 
     217{{{ 
     218xinha_config.fontsize = 
     219  { 
     220    "— size —": "", // — is mdash 
     221    "1 (8 pt)" : "1", 
     222    "2 (10 pt)": "2", 
     223    "3 (12 pt)": "3", 
     224    "4 (14 pt)": "4", 
     225    "5 (18 pt)": "5", 
     226    "6 (24 pt)": "6", 
     227    "7 (36 pt)": "7" 
     228  }; 
     229}}} 
     230 
     231  formatblock:: 
     232    Object.  The different block format types to provide in the drop down select. 
     233{{{ 
     234xinha_config.formatblock = { 
     235    "— format —": "", // — is mdash 
     236    "Heading 1": "h1", 
     237    "Heading 2": "h2", 
     238    "Heading 3": "h3", 
     239    "Heading 4": "h4", 
     240    "Heading 5": "h5", 
     241    "Heading 6": "h6", 
     242    "Normal"   : "p", 
     243    "Address"  : "address", 
     244    "Formatted": "pre" 
     245  }; 
     246}}} 
     247 
     248 
     249  formatblockDetector:: 
     250    Object.  See https://www.coactivate.org/projects/xinha/custom-formatblock-options 
     251 
     252  dialogOptions:: 
     253    Object.  Controls some options for dialogs. 
     254{{{ 
     255  xinha_config.dialogOptions = 
     256  { 
     257    'centered' : true, //true: dialog is shown in the center the screen, false dialog is shown near the clicked toolbar button 
     258    'greyout':true, //true: when showing modal dialogs, the page behind the dialoge is greyed-out 
     259    'closeOnEscape':true 
     260  }; 
     261}}} 
     262 
     263  Events:: 
     264    Object.  Hook into some events, for example... 
     265{{{ 
     266    xinha_config.Events.onKeyPress = function (event)  
     267    { 
     268       //do something  
     269       return false; 
     270    } 
     271}}} 
     272    See EventHooks for discussion about available hooks. 
     273 
     274  debug:: 
     275    Boolean.  Switches on some debug output.  Default false. 
     276 
     277  URIs.iframe_src:: 
     278    String.   The intial (blank) src to use on Xinha's iframe.  Default: 'javascript:\'\'' 
     279 
     280   
     281  bodyClass:: 
     282    String.  A CSS class to apply to the `<body>` element.  Default, none. 
     283 
     284  bodyID:: 
     285    String.  An id attribute to apply to the `<body>` element.  Default, none. 
     286 
     287   
     288 
     289   
     290 
     291