Giter VIP home page Giter VIP logo

angular-ueditor's Introduction

angular-ueditor

angular-ueditor is a prot of Baidu UEditor

The goal is to use UEditor whit angular easier

Demo

http://zqjimlove.github.io/angular-ueditor/

Installation

Include both the javascript file of UEditor:

<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.all.js"></script>

Grab the latest release and javascript file:

<script type="text/javascript" src="angular-ueditor.js"></script>

Then add angular-ueditor to your modules dependencies:

angular.module('app', ['ng.ueditor'])

Bower install

You should include the javascript file of UEditor by yourself,because the UEDitor not in Bower

bower install angular-ueditor --save

Usage

Basic usage

Must bind NgModel

<div class="ueditor" ng-model="content"></div>

Editor customization

You can customize the UEditor by UE start config

<div class="ueditor" config="config" ng-model="content"></div>
...
<script>
    $scope.config = {
        ...
    }
</script>

Method

ready(listener)

Registers a listener callback to be executed whenever the editor ready.

Parameters
parame type Details
listener function(editor) Callback called whenever the editor ready.
Example
<div class="ueditor" ready="ready" ng-model="content"></div>
...
<script type="text/javascript">
    $scope.ready = function(editor){
        alert(editor.getContent());
    }
</script>

Building

If you want to build from master, you need to:

npm install
grunt

Test

npm install
npm test

License

Mit License: http://www.opensource.org/licenses/mit-license.php

angular-ueditor's People

Contributors

zqjimlove avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.