https://github.com/gitbookio/slate-trailing-block
Slate plugin to ensure a trailing block
https://github.com/gitbookio/slate-trailing-block
slate slate-plugin wysiwyg
Last synced: about 1 year ago
JSON representation
Slate plugin to ensure a trailing block
- Host: GitHub
- URL: https://github.com/gitbookio/slate-trailing-block
- Owner: GitbookIO
- License: apache-2.0
- Created: 2016-09-19T12:30:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T20:20:25.000Z (about 8 years ago)
- Last Synced: 2024-04-14T23:59:13.253Z (about 2 years ago)
- Topics: slate, slate-plugin, wysiwyg
- Language: JavaScript
- Size: 56.6 KB
- Stars: 9
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# slate-trailing-block
[](http://badge.fury.io/js/slate-trailing-block)
[](https://travis-ci.org/GitbookIO/slate-trailing-block)
Slate plugin to ensure a trailing block.
### Install
```
npm install slate-trailing-block
```
### Simple Usage
```js
import TrailingBlock from 'slate-trailing-block'
const plugins = [
TrailingBlock({ type: 'paragraph' })
]
```
#### Arguments
This plugin accepts options to redefine the following block types:
- ``[type: String]`` — type for the trailing block
### Utilities
`slate-trailing-block` exports utilities and changes:
#### `changes.focusAtEnd`
`plugin.changes.focusAtEnd(change: Change) => Change`
Focus at the end of the last block.