@tracoco/slate-icon-codeblock
v1.5.0
Published
A slate icon for creating code blocks
Downloads
4
Readme
@tracoco/slate-icon-codeBlock
Icon:
import CodeBlock from "@tracoco/slate-icon-codeBlock";
Plugin:
import { CodeBlockPlugin } from "@tracoco/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"
})
];