Giter Site home page Giter Site logo

taufik-nurrohman / rich-text-editor Goto Github PK

View Code? Open in Web Editor NEW
30.0 4.0 10.0 200 KB

A rich text editor that is designed to accept limited set of inline HTML tags only.

Home Page: http://taufik-nurrohman.js.org/rich-text-editor

License: MIT License

JavaScript 100.00%
rich text editor js javascript wysiwyg simple inline custom

rich-text-editor's Issues

Select the Whole Node on Wrap State

The workaround is currently hacky, but finally I have managed to make the selection wraps to the outside of the inserted node. Like this:

select-node-outer

|<strong>text here</strong>|

Native document.execCommand method wraps the selection inside the inserted node:

native

<b>|text here|</b>

Paste on Mobile removes pasted content immediately

When tested on Apple and Android mobile devices (both on chrome so far) the paste function is not working. As far I can tell the function is being triggered (I extended the paste delay) but as soon as the delay is up it seems the content is not found in "view" and is removed.

Positioning

How can I set the (absolute) position of the editor? There are no top, left, height, width properties.
I currently use $('.rich-text-editor.view.expand').css('top','160px'); but this doesn't work if there is more than one editor since they all have the same classes and there are no id or name attributes to differentiate between them.

Suppor for list elements

Hi, I really like the way the editor is simple, light -weight.
I'm just wondering why doesn't this have a provision for list elements and what does it takes to add list elements to the same?

Thanks
Sujeet

TODO: Stupid Simple Rich Text Editor

I think it’s the time to make this rich text editor API to follow this text editor API.

There shouldn’t be any default controls available. This application should only serve as a helper to replace <textarea> element into a normalized <div contenteditable> element.

Editor controls, keyboard key handling and editor source feature should be created as a separate extensions using the exposed methods.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

CTRL+B to start formatting bold „on the fly”

I'm absolutely new to this, please be kind in reading my request
As I observed, formatting is only possibile by selecting text and then aplying format

I the above is correct, I would suggest implementing „start formatting (bold, italic)” by pressing CTRL+(B, I) - then typing - followed ofcourse by „stop formating (bold, italic) = CTRL+(B,I)

In other words, CTRL+B would insert [b] or [/b] - according to the editor.state

Example CTRL+B bold CTRL+B normal text


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Bug of Insert After’s Cursor Visibility

Current

Works fine just after doing the insert before thing.

error-select-after

Expected

error-select-after-expect

When the cursor selects some text, it will automatically hide the blink effect. Look like the bug was caused by a zero-width selection of … something.

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.