0.1.0 • Published 6 years ago

slate-bible-references v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

slate-bible-references

A Slate plugin to replace Bible references with their text. This is triggered upon the Enter button on a block that matches a Bible reference. For example, if you type a reference like "John 3:16" into a block and then press Enter, that block will be transformed into a container with the actual John 3:16 text in it.

View Demo ⬈

import BibleReferences from 'slate-bible-references';
import { Editor } from 'slate-react';

// Add the plugin to your set of plugins...
const plugins = [
  BibleReferences(),
];

// And later pass it into the Slate editor...
<Editor
  ...
  plugins={plugins}
/>
OptionTypeDescription
esvAPIKeyStringYour ESV API key, required for making API calls - register for one at https://api.esv.org/
ignoreInFunction Array StringAn optional block matcher to ignore triggers inside. If passed an array or string it will match by node.type.
onlyInFunction Array StringAn optional block matcher to only replace triggers inside. If passed an array or string it will match by node.type.