1.2.10 • Published 6 years ago

@bmsterling/slate-icon-codeblock v1.2.10

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

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