Giter Site home page Giter Site logo

ohana54 / angular-contenteditable Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akatov/angular-contenteditable

0.0 1.0 0.0 409 KB

angular model for the "contenteditable" attribute

Home Page: http://akatov.github.io/angular-contenteditable/

License: MIT License

angular-contenteditable's Introduction

angular-contenteditable

Build Status Dependency Status Bitdeli Badge endorse

An AngularJS directive to bind html tags with the contenteditable attribute to models.

Install

bower install angular-contenteditable

Usage

angular.module('myapp', ['contenteditable'])
  .controller('Ctrl', ['$scope', function($scope) {
    $scope.model="<i>interesting</i> stuff"
  }])
<div ng-controller="Ctrl">
  <span contenteditable="true"
        ng-model="model"
        strip-br="true"
        select-non-editable="true">
  </span>
</div>

Notice

The directive currently does not work in any version of Internet Explorer or Opera < 15. Both browsers don't fire the input event for contenteditable fields.

In Chrome, when a contenteditable element X contains a non-contenteditable element Y as the last element, then the behaviour of the caret is the following:

  • When X has style display set to block or inline-block, then the caret moves to the very far right edge of X when it is immediately at the end of X (inserting spaces moves the caret back).

  • When X has style display set to inline, then the caret disappears instead.

Development

npm install
bower install
grunt

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.