Textbox.io 2.x Documentation : configuration

Overview

Textbox.io editor instances are configured through a configuration object, passed as a second argument when creating an editor via replace, replaceAll, inline, or inlineAllDefining properties of a configuration object will override the configuration defaults supplied for any generated instances of editor.

Configuration Object Properties

Note that all properties are optional. Defining a property overrides the editor default behavior.

autosubmitBooleanSpecifies whether textboxio should handle form submission

basePath

StringSpecifies the path to the textboxio resources folder
cssObjectContent CSS and styling application
codeview ObjectCode view feature
images
ObjectImage handling & upload
linksObjectContent link validation
macrosObjectBuilt-in macro configuration
pasteObjectContent paste behavior
spellingObject

Content spell checking service

uiObject

Editor UI including toolbars, menus, etc.


Configuration Defaults

This following object will replicate the default configuration for all Textbox.io instances. 

Implicit Configuration Defaults
var defaultConfig = {
	autosubmit: true,
	css : {
		stylesheets : [''], 
		styles : [                
			{ rule: 'p', 	text: 'block.p' },
			{ rule: 'h1',  	text: 'block.h1' },
			{ rule: 'h2',  	text: 'block.h2' },
			{ rule: 'h3',  	text: 'block.h3' },
			{ rule: 'h4',  	text: 'block.h4' },
			{ rule: 'div', 	text: 'block.div' },
			{ rule: 'pre', 	text: 'block.pre' }
		]
	},
	codeview : {
		enabled: true,
        showButton: true
	},
	images : {
		allowLocal : true
	},
	languages : ['en', 'es', 'fr', 'de', 'pt', 'zh']
    macros : {
        allowed : [ 'headings', 'lists', 'semantics', 'entities', 'hr', 'link' ]
    }
	ui : {
		toolbar :  {
			items : [ 'undo', 'insert', 'style', 'emphasis', 'align', 'listindent', 'format', 'tools' ]
		}
	}
};

Internationalization

 Note that text properties are pre-configured with values like block.p. These string keys refer to the internationalized string label for that item. Using a pre-configured value means that the text value will be internationalized by locale.