Git Product home page Git Product logo

angular-imperavi's Introduction

Angular Imperavi Redactor directive

Created for e154

Note that Imperavi Redactor itself is a proprietary commercial copyrighted software but since Yii community bought OEM license you can use it for free with Yii.

Install

bower install e154/angular-imperavi

Init

app = angular.module('app', [
            'ui.imperavi'
        ]
    )

Using

vm.editor_plugins = ['table', 'video', 'fullscreen', 'clips', 'counter', 'filemanager', 'imagemanager', 'textexpander', 'fontsize', 'textdirection'];
vm.editor_options = {
            autoload_plugins: true
            imageUpload: "/api/admin/post/"+vm.paramId+"/attach/image",
            imageManagerJson: "/api/admin/post/"+vm.paramId+"/attach/list"
            };
vm.model = {
    content_filtered: ""
};

<textarea asset-path="/admin/static/private/imperavi/"
          lang="ru" 
          plugins="post.editor_plugins"
          id="redactor"
          name="redactor"
          ui-imperavi
          ng-model="post.model.content_filtered"
          options="post.editor_options">
</textarea>

Minimal

$scope.content_filtered: ""

<textarea ui-imperavi ng-model="content_filtered"></textarea>

Deps

Asset directory must be visible from the Internet. To be able to dynamically load plugins and language pack Set it:

asset-path="/admin/static/private/imperavi/"

angular-imperavi's People

Contributors

e154 avatar

Watchers

 avatar  avatar  avatar

Forkers

ppodkowinski

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.