|
| 1 | +<p align="center"> |
| 2 | + <a href="https://www.blocknotejs.org"> |
| 3 | + <img alt="TypeCell" src="https://github.com/TypeCellOS/BlockNote/raw/main/docs/public/img/logos/banner.svg?raw=true" width="300" /> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | +Welcome to BlockNote! The open source Block-Based |
| 9 | +React rich text editor. Easily add a modern text editing experience to your app. |
| 10 | +</p> |
| 11 | + |
| 12 | +<p align="center"> |
| 13 | +<a href="https://discord.gg/Qc2QTTH5dF"><img alt="Discord" src="https://img.shields.io/badge/Chat on discord%20-%237289DA.svg?&style=for-the-badge&logo=discord&logoColor=white"/></a> |
| 14 | +</p> |
| 15 | + |
| 16 | +<p align="center"> |
| 17 | + <a href="https://www.blocknotejs.org"> |
| 18 | + Homepage |
| 19 | + </a> - <a href="https://www.blocknotejs.org/docs/introduction"> |
| 20 | + Documentation |
| 21 | + </a> - <a href="https://www.blocknotejs.org/docs/quickstart"> |
| 22 | + Quickstart |
| 23 | + </a>- <a href="https://www.blocknotejs.org/examples"> |
| 24 | + Examples |
| 25 | + </a> |
| 26 | +</p> |
| 27 | + |
| 28 | +# Live demo |
| 29 | + |
| 30 | +See our homepage @ [https://www.blocknotejs.org](https://www.blocknotejs.org/) or browse the [examples](https://www.blocknotejs.org/examples). |
| 31 | + |
| 32 | +# Example code (React) |
| 33 | + |
| 34 | +[](https://badge.fury.io/js/%40blocknote%2Freact) |
| 35 | + |
| 36 | +```typescript |
| 37 | +import { useCreateBlockNote } from "@blocknote/react"; |
| 38 | +import { BlockNoteView } from "@blocknote/mantine"; |
| 39 | +import "@blocknote/core/fonts/inter.css"; |
| 40 | +import "@blocknote/mantine/style.css"; |
| 41 | + |
| 42 | +function App() { |
| 43 | + const editor = useCreateBlockNote(); |
| 44 | + |
| 45 | + return <BlockNoteView editor={editor} />; |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +`@blocknote/react` comes with a fully styled UI that makes it an instant, polished editor ready to use in your app. |
| 50 | + |
| 51 | +If you prefer to create your own UI components (menus), or don't want to use React, you can use `@blocknote/core` (_advanced_, [see docs](https://www.blocknotejs.org/docs/vanilla-js)). |
| 52 | + |
| 53 | +# Features |
| 54 | + |
| 55 | +BlockNote comes with a number of features and components to make it easy to embed a high-quality block-based editor in your app: |
| 56 | + |
| 57 | +### Animations: |
| 58 | + |
| 59 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/animations.gif?raw=true" width="400" /> |
| 60 | + |
| 61 | +### Helpful placeholders: |
| 62 | + |
| 63 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/placeholders.gif?raw=true" width="400" /> |
| 64 | + |
| 65 | +### Drag and drop blocks: |
| 66 | + |
| 67 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/dragdrop.gif?raw=true" width="400" /> |
| 68 | + |
| 69 | +### Nesting / indentation with tab and shift+tab: |
| 70 | + |
| 71 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/nesting.gif?raw=true" width="400" /> |
| 72 | + |
| 73 | +### Slash (/) menu: |
| 74 | + |
| 75 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/slashmenu.gif?raw=true" width="400" /> |
| 76 | + |
| 77 | +### Format menu: |
| 78 | + |
| 79 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/selectmenu.gif?raw=true" width="400" /> |
| 80 | + |
| 81 | +### Real-time collaboration: |
| 82 | + |
| 83 | +<img src="https://github.com/TypeCellOS/BlockNote/blob/readme/.resources/collaboration.gif?raw=true" width="400" /> |
| 84 | + |
| 85 | +# Feedback 🙋♂️🙋♀️ |
| 86 | + |
| 87 | +We'd love to hear your thoughts and see your experiments, so [come and say hi on Discord](https://discord.gg/Qc2QTTH5dF) or [Matrix](https://matrix.to/#/#typecell-space:matrix.org). |
| 88 | + |
| 89 | +# Contributing 🙌 |
| 90 | + |
| 91 | +See [CONTRIBUTING.md](CONTRIBUTING.md) for more info and guidance on how to run the project (TLDR: just use `npm start`). |
| 92 | + |
| 93 | +Directory structure: |
| 94 | + |
| 95 | +``` |
| 96 | +blocknote |
| 97 | +├── packages/core - The core of the editor |
| 98 | +├── packages/react - The main library for use in React apps |
| 99 | +├── packages/mantine - Mantine (default) implementation of BlockNote UI |
| 100 | +├── packages/ariakit - AriaKit implementation of BlockNote UI |
| 101 | +├── packages/shadcn - ShadCN / Tailwind / Radix implementation of BlockNote UI |
| 102 | +├── examples - Example apps |
| 103 | +├── playground - App to browse the example apps (https://playground.blocknotejs.org) |
| 104 | +└── tests - Playwright end to end tests |
| 105 | +``` |
| 106 | + |
| 107 | +The codebase is automatically tested using Vitest and Playwright. |
| 108 | + |
| 109 | +# License 📃 |
| 110 | + |
| 111 | +BlockNote is licensed under the [MPL 2.0 license](https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/), which allows you to use BlockNote in commercial (and closed-source) applications. If you make changes to the BlockNote source files, you're expected to publish these changes so the wider community can benefit as well. |
| 112 | + |
| 113 | +# Credits ❤️ |
| 114 | + |
| 115 | +BlockNote builds directly on two awesome projects; [Prosemirror](https://prosemirror.net/) by Marijn Haverbeke and [Tiptap](https://tiptap.dev/). Consider sponsoring those libraries when using BlockNote: [Prosemirror](https://marijnhaverbeke.nl/fund/), [Tiptap](https://github.com/sponsors/ueberdosis). |
| 116 | + |
| 117 | +BlockNote is built as part of [TypeCell](https://www.typecell.org). TypeCell is proudly sponsored by the renowned [NLNet foundation](https://nlnet.nl/foundation/) who are on a mission to support an open internet, and protect the privacy and security of internet users. Check them out! |
| 118 | + |
| 119 | +<a href="https://nlnet.nl"><img src="https://nlnet.nl/image/logos/NGIAssure_tag.svg" alt="NLNet" width="100"></a> |
| 120 | + |
| 121 | +Hosting and deployments powered by Vercel: |
| 122 | + |
| 123 | +<a href="https://vercel.com/?utm_source=TypeCell&utm_campaign=oss"><img src="https://images.ctfassets.net/e5382hct74si/78Olo8EZRdUlcDUFQvnzG7/fa4cdb6dc04c40fceac194134788a0e2/1618983297-powered-by-vercel.svg" alt="NLNet" width="150"></a> |
| 124 | + |
| 125 | +This project is tested with BrowserStack |
0 commit comments