@canner/slate-icon-codeblock

1.5.0 • Public • Published

@canner/slate-icon-codeBlock

npm version

Icon:

import CodeBlock from "@canner/slate-icon-codeBlock";

Plugin:

import { CodeBlockPlugin } from "@canner/slate-icon-codeBlock";

Also you'll need to add these two plugins to make code blocks work:

import EditPrism from "slate-prism";
import EditCode from "slate-edit-code";

plugins = [
  EditPrism({
    onlyIn: node => node.type === "code_block",
    getSyntax: node => node.data.get("syntax")
  }),
  EditCode({
    onlyIn: node => node.type === "code_block"
  })
];

Readme

Keywords

none

Package Sidebar

Install

npm i @canner/slate-icon-codeblock

Weekly Downloads

56

Version

1.5.0

License

MIT

Unpacked Size

21.2 kB

Total Files

6

Last publish

Collaborators

  • wwwy3y3
  • cannerbot