Skip to content

Setting Defaults v1.1.x

SimeonC edited this page Feb 18, 2014 · 1 revision

textAngular has some defaults that affect all instances of textAngular. There are two objects that contain the defaults for textAngular, both reside in the $rootScope.

1. textAngularOpts

Description

This object contains all of the display and class default options. These values can be overwritten via individual attributes on the textAngular instances by prefixing the name with ta- and for the class attributes appending -class, eg $rootScope.textAngularOpts.toolbar becomes ta-toolbar and $rootScope.textAngularOpts.classes.toolbar becomes ta-toolbar-class.

Default

$rootScope.textAngularOpts = {
  toolbar: [
        ['h1', 'h2', 'h3', 'p', 'pre', 'bold', 'italics', 'ul', 'ol', 'redo', 'undo', 'clear'], 
        ['html', 'insertImage', 'insertLink']
  ],
  classes: {
    focussed: "focussed",
    toolbar: "btn-toolbar",
    toolbarGroup: "btn-group",
    toolbarButton: "btn btn-default",
    toolbarButtonActive: "active",
    textEditor: 'form-control',
    htmlEditor: 'form-control'
  }
}

Supported Options

bold clear h1 h2 h3 html insertImage insertLink italics justifyCenter justifyLeft justifyRight ol p pre quote redo ul undo

2. textAngularTools

Description

This object contains all the available Tools that can be instantiated on the toolbar.

Defaults

See textAngular.js Line 42 in repository.