Page tree
Skip to end of metadata
Go to start of metadata

The configuration css property defines options related to editor rendering CSS and CSS classes/elements available in the styles menu.

Example Configuration

In this example, a simple configuration object is created that adds a rendering stylesheet to the editor, inline rendering CSS,  and configures the styles available to apply.

var config = {
	css : {
		documentStyles : 'body { background: red; }',
		styles : [

			{ rule : 'p' },
			{ rule : 'h1.blue', text: 'Blue Heading 1' },
			{ rule : '.green', text: 'Green Inline Style' }
		],
		stylesheets : ['test.css']
		
	}
};
 
var editor = textboxio.replace('#targetId', config);

Properties

PropertyTypeValue
documentStylesString

String of CSS for rendering editor content.

Note: this parameter is ignored when using inline editing (i.e. invoking the editor with texboxio.inline())

stylesArrayAn array of available styles definitions.
stylesheetsArray

An array of string paths to editor rendering stylesheets.

Note: this parameter is ignored when using inline editing (i.e. invoking the editor with texboxio.inline())

 

 

  • No labels