Skip to content

Astray-git/ng-ueditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-ueditor

This directive allows you to add a UEditor to your form elements.

Requirements

Install

bower install ng-ueditor --save

Usage

Load the script files:

<script type="text/javascript" src="app/bower_components/ueditor-bower/ueditor.config.js"></script>
<script type="text/javascript" src="app/bower_components/ueditor-bower/ueditor.all.min.js"></script>
<script type="text/javascript" src="app/bower_components/angular/angular.js"></script>
<script type="text/javascript" src="app/bower_components/ng-ueditor/dist/ng-ueditor.min.js"></script>

add ng-ueditor module as a depenency:

angular.module('myModule', ['ng.ueditor']);

use as a directive, you must provide a ng-model for view data biding, you can put specific id for multiple editors.

<textarea
    ng-ueditor="Controller.ueditorConfig"
    ready="Controller.ready($editor)"
    ng-model="Controller.ueditorContent"
></textarea>

custom options

  • ng-ueditor add custom config.
  • ready (optional) Breaking change since 0.3 now accept an expression to evaluate upon editor ready (editor instance available as $editor)
  • all-html (optional) normally result is get from UE.Editor.getContent use this attribute tell ueditor to return all html using UE.Editor.getAllHtml, result including some ueditor style blocks.

Building

  • npm install
  • bower install
  • gulp build source files