Popline is an HTML5 Rich-Text-Editor Toolbar

Related tags

Editors popline
Overview

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 pinterest, 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+, IE 8+

Sponsorer

A Sepcial thanks to Artlogic's sponsor for IE8+ browsers compatibility support.

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) 2014 kenshin54. Distributed under the MIT License. See LICENSE.txt for further details.

Bitdeli Badge

Comments
  • Popline appears off-screen for highlights at the top of a document

    Popline appears off-screen for highlights at the top of a document

    This is reproducible on the demo page. Simply reduce the window to a size where scrolling is required (or alternatively add more content so that scrolling is required) and scroll part of the way down the page. Select the sentence at the top of the window. Popline appears out of screen bounds 2014-10-24 09_22_50-popline - an html5 rich-text-editor toolbar

    opened by roryok 8
  • Add link to text is broken

    Add link to text is broken

    I tested all functions on the menu.

    All functions work well except creating link on selected text. It is broken I think.

    Can you investigate on this one?

    opened by beebun 6
  • InsertOrderedList doesn't make new list with marked text

    InsertOrderedList doesn't make new list with marked text

    I just have the issue with InsertOrderedList. Actually, I have modified your code (popline) into my own.

    BTW, I'm still using this code to make a list. document.execCommand("InsertOrderedList", false);

    I posted the question on StackOverflow so people can help me figure it out. http://stackoverflow.com/questions/25920561/insertorderedlist-doesnt-make-new-list-with-marked-text

    Do you have any suggestions?

    opened by beebun 5
  • No Buttons?? - makeButtons doesn't seem to be working

    No Buttons?? - makeButtons doesn't seem to be working

    I have installed popline (epub.amadreason.co.uk to see test code (scroll to bottom and highlight lorem ipsum)) and though the ul loads and pops up when text is highlighted there are no buttons (li elements) within the ul.

    Any help with this would be greatly appreciated.

    opened by aMadReason 5
  • Popline appears even on non-contenteditable element

    Popline appears even on non-contenteditable element

    Hello,

    I have a floating window composed of an unordered list each containing a div that when double-clicked upon becomes editable. I then call on Popline by creating an instance clickedDiv.popline({position: "fixed"}). However when clicked outside the div, it ceases to be editable, but there is no documented mechanism to destroy the generated instance. Then when clicked on another div (i.e. in another li element), Popline pops up, although the div does not have the "content editable" attribute. I beileve this could be solved if there was a way to dynamically create Popline instance and destroy them as necessary.

    Thank you!

    opened by jackdeguest 2
  • Asking to merge new features (from forking repo)

    Asking to merge new features (from forking repo)

    I have been using your plugins and it works very well. So, I decided to add new features to menu such as "Insert image", "Insert table" on my forking repo.

    I would like to ask you, is it possible to merge my code to your main repo (kenshin54/popline). I think it might be useful for everyone to use these features.

    cheers

    opened by beebun 2
  • any plan on image manipulation?

    any plan on image manipulation?

    Thanks for creating this plugin ,it is tiny but functional well satisfied my general needs.

    however,I noticed that in popline it seemed that image has less maneuverability than test.I can call out popline's tool bar easy by select a bit of text,but it wouldn't happen if I select a single image instead.It confuse me alot.

    beside,I wonder if popline can support some basic image manipulation method Like resize.It is unnecessary to achieve somekind of complicated word-like drag auto-resize,I think two simple editable blocks about width and height will be well satisfied. I know things always complicated than we thought,so here i'm only wondering if it's in the develop plan,thanks~~

    and at the end,sorry about my odd english and thanks try to understand it....

    opened by wywzxxz 2
  • Fix indent overflow

    Fix indent overflow

    Fixes #4

    The main issue here is that document.execCommand("indent") nests the selected line in blockquotes. Eventually, the summed margins of these nested blockquotes will cause the paragraph to overflow out of the editor div. I've fixed this by comparing the sum of blockquote margins to the width of the editor, so this is flexible if you later decide to change the default indent size.

    I also moved the scripts to the bottom of index.html to ensure that DOM manipulation (needed for computing blockquote margin) functions correctly. It's good style anyway to put JavaScript at the end of the body, since it blocks rendering. :)

    opened by amitburst 2
  • make unordered list - browser hangs

    make unordered list - browser hangs

    • go to your demo page (http://kenshin54.github.io/popline/)
    • select everything from "The default [...]" to "[...] kenshin54"
    • select "unordered list"

    BAM - browser hangs

    browser: Chrome 28

    (I think it's the smiley which cause this)

    opened by lloiser 2
  • fix issue #30, fix issue where rect undefined in IE

    fix issue #30, fix issue where rect undefined in IE

    Fixed the issue described in issue #30 by having toolbar appear below selection rectangle if there is not enough distance between scrollTop and rect for it.

    Also fixed a separate Windows Store WebView (IE11) issue where rect can sometimes be undefined. Added if statement to handle this case.

    opened by roryok 1
  • Make popline editor buttons and view buttons totaly optional

    Make popline editor buttons and view buttons totaly optional

    The concept of having a bubble appear on text-select is pure genius, jQuery-wise. But in my case I have a powerful WYSIWYG already, and don't need the one that popline provides.

    In the popline.js I killed

    //makeButtons.call(this, this.bar, $.popline.buttons);

    And did this

      init: function() {
        this.bar = $("#tinymceWrapperBubbleNP").addClass("popline");
    

    Now I have a beautiful Tinymce 4 real floating toolbar for contenteditables

    opened by donShakespeare 1
  • Link selection does not always work in Firefox

    Link selection does not always work in Firefox

    Scenario:

    1. Text is selected and then linked via the link button.
    2. Selecting the text thereafter does not always show the unlink button, instead it shows the link button. This is intermittent, at times it works and at other times it doesn't work even though only the text that is linked is selected. Selecting portions of the linked text and not the entire linked text seems to always show the unlink button.

    In checking the code I see there is a different function that is called when Firefox is being used (ie. firefoxSelectionIsLink()).

    I am using the latest version of Firefox at the time of writing - 82.0

    I found a link on Stack Overflow (https://stackoverflow.com/questions/47232304/check-if-selection-contains-link) that deals with this and have replaced the existing function with the answer from "user670839". This seems to be working.

    opened by ChristinePHP 0
  • get image innerHTML

    get image innerHTML

    sorry, this is not an issue. Just wondering how to get the the source code if the text contains an image.

    I created a custom button in the social section like so:

        custom: {
          iconClass: "fa fa-comments",
          mode: "view",
          action: function(event) {
            $('#customformcontainer').removeClass('hide');
            $('#customtextarea').text($.popline.utils.selection().text()); 
          }
        }
    

    Im returning the text inside a commentBox/contactForm ... Just experimenting with your awesome code :-) But if the text contains an image it is ignored.

    Im wondering how can I return the html value like so: <img src="https://github.com/image.png">

    oh, btw Great job on the code ! Looks really great !

    opened by baroninn 0
  • Color disappearing

    Color disappearing

    Hi,

    the color of selected text disappears when I perform next steps: -set H1 -set color -change heading to let's say H2

    Any suggestions how to solve this?

    Thanks in advance

    opened by A-Kojic 0
  • Can't change url color

    Can't change url color

    Hi, when I mark part of the text as a link, and try to change the color it doesn't effect it. It's true that it wraps link with font tag but it can't override link's style.

    Example: <font color="#ff0000"> <a href="http://google.com">Text</a> </font> a { color: #2E8CFA; }

    opened by A-Kojic 2
  • Can't set bold on

    Can't set bold on "h" tags in Firefox

    Hi, the tool is great, but I encountered one issue. When I mark text as h1-h6 and then bold it, it doesn't apply. For this case italic and underline work. I even tried this on your demo page and it's the same. Any suggestions how to solve this?

    opened by A-Kojic 2
  • It does not work on the ajax loaded text

    It does not work on the ajax loaded text

    Hi, its a great plugin!

    1. When the page is loaded, when you select text plugin works. When changing text on the page using ajax, plugin also works.
    2. When the page is loaded, and then the text changes using ajax - when you select text to change the text of the plugin does not work.

    How can I fix this?

    opened by Dimun017 1
Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.

This project isn’t maintained anymore Please check out this fork. wysihtml5 0.3.0 wysihtml5 is an open source rich text editor based on HTML5 technolo

Christopher Blum 6.5k Dec 30, 2022
HTML5 rich text editor. Try the demo integration at

Squire Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation in a flexible lightweight package (only 16.5KB of JS a

Neil Jenkins 4.4k Dec 28, 2022
Override the rich text editor in Strapi admin with ToastUI Editor.

strapi-plugin-wysiwyg-tui-editor ⚠️ This is a strapi v4 plugin which does not support any earlier version! A Strapi plugin to replace the default rich

Zhuo Chen 12 Dec 23, 2022
Simple rich text editor (contentEditable) for jQuery UI

Hallo - contentEditable for jQuery UI Hallo is a very simple in-place rich text editor for web pages. It uses jQuery UI and the HTML5 contentEditable

Henri Bergius 2.4k Dec 17, 2022
A modern, simple and elegant WYSIWYG rich text editor.

jQuery-Notebook A simple, clean and elegant WYSIWYG rich text editor for web aplications Note: Check out the fully functional demo and examples here.

Raphael Cruzeiro 1.7k Dec 12, 2022
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.

If you would be interested in helping to maintain one of the most successful WYSIWYG text editors on github, let us know! (See issue #1503) MediumEdit

yabwe 15.7k Jan 4, 2023
Tiny bootstrap-compatible WISWYG rich text editor

bootstrap-wysiwyg Important information for Github requests/issues Please do not submit issues/comments to this repo. Instead, submit it to https://gi

MindMup 5.6k Jan 3, 2023
A rich text editor for everyday writing

Trix A Rich Text Editor for Everyday Writing Compose beautifully formatted text in your web application. Trix is a WYSIWYG editor for writing messages

Basecamp 17.3k Jan 3, 2023
A powerful WYSIWYG rich text web editor by pure javascript

KothingEditor A powerful WYSIWYG rich text web editor by pure javascript Demo : kothing.github.io/editor The KothingEditor is a lightweight, flexible,

Kothing 34 Dec 25, 2022
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular

TinyMCE TinyMCE is the world's most advanced open source core rich text editor. Trusted by millions of developers, and used by some of the world's lar

Tiny 12.4k Jan 4, 2023
A completely customizable framework for building rich text editors. (Currently in beta.)

A completely customizable framework for building rich text editors. Why? · Principles · Demo · Examples · Documentation · Contributing! Slate lets you

Ian Storm Taylor 26.2k Dec 30, 2022
Collection of tools for building rich text editors.

psst we have great documentation at https://bangle.dev What is bangle.dev ? bangle.dev is a collection of components for building powerful editing exp

null 553 Dec 29, 2022
Raptor, an HTML5 WYSIWYG content editor!

Raptor Editor Raptor Editor is a user-focused extensible WYSIWYG website content editor - check out the Demo. It is designed to be user and developer

PANmedia 533 Sep 24, 2022
A markdown editor. http://lab.lepture.com/editor/

Editor A markdown editor you really want. Sponsors Editor is sponsored by Typlog. Overview Editor is not a WYSIWYG editor, it is a plain text markdown

Hsiaoming Yang 2.8k Dec 19, 2022
A chrome extension which helps change ace editor to monaco editor in web pages, supporting all features including autocompletes.

Monaco-It Monaco-It is a chrome extension turning Ace Editor into Monaco Editor, supporting all features including autocompletes. 一些中文说明 Supported Lan

null 3 May 17, 2022
Typewriter is a simple, FOSS, Web-based text editor that aims to provide a simple and intuitive environment for you to write in.

Typewriter Typewriter is a simple, FOSS, Web-based text editor that aims to provide a simple and intuitive environment for you to write in. Features S

Isla 2 May 24, 2022
Verbum is a fully flexible text editor based on lexical framework.

Verbum Verbum - Flexible Text Editor for React Verbum is a fully flexible rich text editor based on lexical-playground and lexical framework. ⚠️ As th

Ozan Yurtsever 560 Dec 29, 2022
The next generation Javascript WYSIWYG HTML Editor.

Froala Editor V3 Froala WYSIWYG HTML Editor is one of the most powerful JavaScript rich text editors ever. Slim - only add the plugins that you need (

Froala 5k Jan 1, 2023
Ace (Ajax.org Cloud9 Editor)

Ace (Ajax.org Cloud9 Editor) Note: The new site at http://ace.c9.io contains all the info below along with an embedding guide and all the other resour

Ajax.org B.V. 25.2k Jan 4, 2023