wiki:Documentation/ConfigVariablesList

Version 1 (modified by mokhet, 13 years ago) (diff)

--

var config = new HTMLArea.Config();

Config.baseHref

Config.baseURL

Thoses two properties will probably merged in a single one. This text will be updated when more informations about it will be available.

Config.btnList

Array of buttons and actions.

Config.charSet

Document charset. Can be changed, but in general it shouldn't be changed. This only defines the charset used in the iframe.

Config.debug

Switch Xinha debug mode.

Allowed values are true or false.
true : Xinha is in debug mode.
false : no debug message will be provided when exceptions occurs.
default value : true

Config.fontname

Array of the various options listed in font selectbox.

Config.fontsize

Array of the various options listed in font size selectbox.

Config.formatblock

Array of the various options listed in format selectbox.

Config.fullPage

Allowed values are true or false.

true : will retrieve the full HTML, starting with the <HTML> tag.
false : retrieve only the body content.
default value : false

Config.height

This property height control the height of the editor.

Allowed values are 'auto' or a numeric value followed by px.
auto : let Xinha choose the height to use.
numeric value : forced height in pixels ('200px').
default value : 'auto'

Config.helpURL

URL of help file, relative url to _editor_url.

default value : _editor_url + "reference.html"

Config.htmlareaPaste

This property control the behaviour when user press the keys CTRL and V.

Allowed values are true or false.
true : intercept V and use the internal paste command.
false : passes
V through to browser editor widget
default value : false

Config.htmlRemoveTags

Regexp allowing the remove of HTML tags.

Allowed values are null or a regexp.
null : functionality is not desired.
regex : regexp to remove tags.
default value : null

Config.imgURL

URL of image directory, relative url to _editor_url.

default value : "images/"

Config.killWordOnPaste

Control the behaviour of the paste commande with Word code.

Allowed values are true or false.
true : if you want Word code to be cleaned upon Paste.
false : the Paste command will not remove any invalid Word code.
default value : true

Config.makeLinkShowsTarget

Enable the 'Target' field in the Make Link dialog. The TARGET property is invalid with XHTML document.

Allowed values are true or false.
true : enable the 'Target' field in the Make Link dialog.
false : disable the 'Target' field in the Make Link dialog.
default value : true

Config.mozParaHandler

Propriété contrôlant le comportement de Xinha lors de l'appui sur la touche ENTER.

Allowed values are sont 'built-in', 'dirty' ou 'best'.
built-in : will (may) use 'br' instead of 'p' tags.
dirty: will use p and work good enough for the majority of cases.
best: works the best, but will probably be slower than 'dirty'
default value : 'best'

Config.pageStyle

Style included in the iframe document.

default value :

When a lot of inline style is used, perhaps it is wiser to use one or more external stylesheets. To set tags P in red, H1 in blue en A not underlined, we may do the following

var config = new HTMLArea.Config();
config.pageStyle = 
  'p { color:red; }\n' +
  'h1 { color:bleu; }\n' +
  'a {text-decoration:none; }';

Config.pageStyleSheets

Array of external stylesheets to load.

default value : []

Config.panel_dimensions

Width of the "Right Side" panel, when present.

default value : { left:'200px', right:'200px', top:'100px', bottom: '100px' }

Config.popupURL

URL of popups directory, relative url to _editor_url.

default value : "popups/"

Config.sizeIncludesToolbar

Specifies whether the toolbar should be included in the size or not.

Allowed values are true or false.
true : the toolbar height is included in the editor height.
false : the toolbar height is not included in the editor height.
default value : true

Config.specialReplacements

Sometimes we want to be able to replace some string in the html coming in and going out, so that in the editor we use the "internal" string, and outside and in the source view we use the "external" string this is useful for say making special codes for your absolute links, your external string might be some special code, say "{server_url}" an you say that the internal representation of that should be http://your.server/

var config = new HTMLArea.Config();
config.specialReplacements = { 'http://my.server/' : '{server_url}' };

Config.statusBar

This property enable creation of a status bar.

Allowed values are true or false.
true : enable the status bar.
false : disable the status bar.
default value : true

Config.stripBaseHref

If true the baseHref will be removed from links. that means you will get relative links, not absolute-links.

Allowed values are true or false.
true : if you want the baseHref to be removed from links (relative links).
false : no update done to the baseHref (absolute links).
default value : true

Config.stripSelfNamedAnchors

If true the baseHref will be removed from named anchors.

Allowed values are true or false.
true : if you want the baseHref to be removed from named anchors (#anchor).
false : no update done to the baseHref (http://Xinha_editor_url#anchor).[[BR]] default value : true

Config.toolbar

Array of icons to show on iconbar.

Config.undoSteps

Maximum size of the undo queue.

Allowed values are numeric values.
default value : 20

Config.undoTimeout

The time interval at which undo samples are taken, expressed in milliseconds.

Allowed values are numeric values.
default value : 500

Config.URIs

Array of the various URIs of the popup files. 6 URIs are availables.

  • blank : blank document
  • link : popup to insert / update a link
  • insert_image : popup to insert / update an image
  • insert_table : popup to insert / update a table
  • select_color : color selector
  • about : about Xinha popup

To update the url to insert an image and the one to insert a link to PHP file without creating new plugins, we will do :

var config = new HTMLArea.Config();
config.URIs['insert_image'] = 'my_insert_image.php';
config.URIs['link'] = 'my_insert_link.php';

Config.width

This property width control the width of the editor.

Allowed values are 'auto', 'toolbar' or a numeric value followed by px.
auto : let Xinha choose the width to use.
toolbar : compute the width size from the toolbar width.
numeric value : forced width in pixels ('600px').
default value : 'toolbar'