@canner/slate-icon-codeblock

A slate icon for creating code blocks

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@canner/slate-icon-codeblock
Minified + gzip package size for @canner/slate-icon-codeblock in KB

Readme

@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"
  })
];

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.