Skip to content

A micro-library for building wysiwyg editors? #10

Open
@sabine

Description

I stumbled on this when I read about it in one of the contenteditable issues on medium-editor.

I very much approve of the idea to not use execCommand. Have you looked at https://github.com/basecamp/trix?

From what I understand so far, a reasonable workflow around contenteditable is to

  • use it to manage selection/cursor
  • use it as an input device (e.g., through MutationObserver, and/or the input event)
  • use it as a display device (have a separate document model that is rendered into the contenteditable element (possibly with DOM-diffing))

I tried https://github.com/jakiestfu/Medium.js and found it quite interesting, but I believe that the approach of "keeping the HTML content of the contenteditable semantic, simple, and clean" is not the best way of doing things.

To me, it looks like we still need a library that make it easy to build wysiwyg editors (not necessarily only for rich text, mind you) around contenteditable without touching the icky contenteditable parts.

Does that make any sense?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions