Giter VIP home page Giter VIP logo

blocky-editor's Introduction

Blocky Editor

Blocky Editor is an editor which supports the concept of blocks. It can help you to build an editor like Notion. It's tiny, fast and extensible. You can extend it with blocks.

| Demo | Documentations |

Why?

The main goal of this project is to provide an editor which is small and fast enough to be embedded in Notion-like apps.

It doesn't depend on any heavy editor framework, and it handles the complex text-editing details for you.

The developers only need to develop their blocks with their favourite UI frameworks.

Features

  • Extremely small.
  • Extensible. Extend the editor with custom blocks and spans.
  • Static typed.
  • Collaborative editing.

Packages

  • Core(npm): The core of the editor. Written in vanilla JS. It can be used standalone without any UI frameworks.
    • Gzipped size: ~40kb
  • React bindings(npm): Wrap the editor in React. Provide the UI facilities such as toolbar and spanner.
    • Gzipped size(including Core): ~48kb
  • Example: The example to demonstrate how to use the editor.

Resources

Products

Compatibility

Tested on

  • Google Chrome
  • Microsoft Edge
  • Safari

blocky-editor's People

Contributors

doodlewind avatar vincentdchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blocky-editor's Issues

Optional title block support

Blocky looks very promising!

I'm trying to find out if I can integrate Blocky as a simple input box component (e.g. using it in a comment section), since it's really light. But currently Blocky assumes a title block by default, while in this case title is generally not needed.

I did some quick tweaks based on current master branch, adding hasTitle: false config and it seems to work (doodlewind@448d376). But the behavior of enter breaks, so not sure if there is any other coupling related to title concept. Any ideas? Would love to see what I can do :)

Code block

Implement the code block with codemirror.

Provide `charAt` for BlockyTextModel

Return the char at the index of the delta.
If the position is not a char(an embed), return null

  charAt(index: number): string | Record<string, unknown> | undefined

Open online demo fail

The demo link [https://blocky-editor.dev/] has unexpectedly closed the connection, maybe the domain has been expired?

Inconsistent paired undo/redo

This is an easy-to-reproduce issue that may be encountered at high frequency.

To reproduce:

  • Insert or delete a word in blocky example
  • Undo -> redo -> undo -> redo

After second undo, the history state can't be recovered again :(

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.