Coder Social home page Coder Social logo

popline's Introduction

popline

Popline is a non-intrusive WYSIWYG editor that shows up only after selecting a piece of text on the page, inspired by popclip.

Usage

Load jQuery and popline:

<script type="text/javascript" src="../scripts/jquery.min.js"></script>
<script type="text/javascript" src="../scripts/jquery.popline.min.js"></script>

Or Load the popline plugins which you want:

<script type="text/javascript" src="../scripts/jquery.popline.js"></script>
<script type="text/javascript" src="../scripts/plugins/jquery.popline.link.js"></script>
<script type="text/javascript" src="../scripts/plugins/jquery.popline.decoration.js"></script>
...

Load font-awesome and popline theme:

<link rel="stylesheet" type="text/css" href="../font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="../themes/default.css" />

Add a editable div to page:

<div class='editor' contenteditable='true'></div>

Initialize you popline for you editor:

$(".editor").popline();

View Mode

Popline also support View Mode, you can send a twitter, a facebook message, pin an image to pinterst, search with google in View Mode

$(".editor").popline({mode: 'view'});

Popup Position

Popline can popup at top of the paragraph which you selected (like Medium) or popup on the mouse pointer position.

$(".editor").popline({position: 'fixed'});
$(".editor").popline({position: 'relative'});

The default option is 'fixed'.

Enable / Disable / Reorder plugins

You can enable/disable/reorder plugins when popline initialize.

$(".editor").popline({enable: ["link", ["justify", ["justifyCenter", "indent"]] , "orderedList", "unOrderedList"]});
$(".editor").popline({disable: ["link", "blockquote"]});

Extension

Todo

Theme customize

default

default

popclip

popclip

Hack the theme css and create yours.

Example

http://kenshin54.github.io/popline/

Compatibility

Tested on Chrome 27.0, Safari 6.0.4, Firefox 21.0, Opera 15.0

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Copyright (c) 2013 kenshin54. Distributed under the MIT License. See LICENSE.txt for further details.

Bitdeli Badge

popline's People

Contributors

bitdeli-chef avatar foo9 avatar huwence avatar kenshin54 avatar larryzhao avatar onesandtwos 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.