carstenschaefer / redactor-fontSize

Redactor plugin: Adds a button to toolbar to change font size. Button shows current user choice or font size of current caret position (current selected text).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redactor-fontSize

Adds a button to the toolbar to change the font size. The button always displays the selected font size at the current caret position.

A plugin developed for Redactor, a WYSIWYG rich-text editor made by imperavi.

The example uses Angular Redactor.

Feel free to contribute to this repository.

##Installation

Include fontFamily.js in your markup:

<script src="fontSize.js"></script>

Add some styles to your css:

.redactor-toolbar li .re-icon.re-fontSizeList{
    width:auto;
    text-transform: capitalize;
}

##Usage Configuration via HTML markup:

<div id="page-editor-toolbar"></div>
 <textarea ng-model="pageModel.content"
                redactor="{
                            focus: true,
                            linebreaks: false,
                            tabKey: true,
                            plugins: ['fontSize'],
                            toolbarExternal: '#page-editor-toolbar',
                            fontSize: {
							  defaultSize : "14"
						    }
						  }"></textarea>

About

Redactor plugin: Adds a button to toolbar to change font size. Button shows current user choice or font size of current caret position (current selected text).

License:MIT License


Languages

Language:JavaScript 100.0%