Skip to content

rangelkoli/blocknote-draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drawing Canvas for Blocknote

Stability Badge

Code block for Blocknote.

Installation

Install via YARN

Get the package

$ yarn add blocknote-draw

Usage

Include module at your application

import { Draw, insertDraw } from "blocknote-draw";

Create schema with code block.

const schema = BlockNoteSchema.create({
  blockSpecs: {
    ...defaultBlockSpecs,
    draw: Draw,
  },
});

Add slash menu item.

<BlockNoteView editor={editor} slashMenu={false}>
  <SuggestionMenuController
    triggerCharacter={"/"}
    getItems={async (query) =>
      filterSuggestionItems(
        [...getDefaultReactSlashMenuItems(editor), insertDraw()],
        query
      )
    }
  />
</BlockNoteView>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published