Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@slate-editor/font-size-plugin
Advanced tools
SlateJS font size mark content editable plugin.
The goal of this plugin is to offers an easy handling of SlateJS font size mark content editable. Providing a simple API and easy usage, basing on concept of plugin-centric by SlateJS framework.
import React, { Component } from 'react'
import FontSizePlugin from 'slate-font-size-plugin'
const plugins = [
FontSizePlugin()
]
class SlateEditor extends Component {
onChange(state) {
this.setState({ state })
}
render() {
return (
<Editor
plugins={plugins}
state={this.state.state}
onChange={this.onChange.bind(this)}
/>
)
}
}
import React, { Component } from 'react'
import { FontSizeInput } from 'slate-font-size-plugin'
class SlateEditor extends Component {
onChange(state) {
this.setState({ state })
}
render() {
return (
<div className="editor--toolbar">
<FontSizeInput
state={this.state.state}
onChange={this.onChange.bind(this)}
/>
</div>
)
}
}
Platform | Action | Shortcut |
---|---|---|
Increase | ⌘+shift+> | |
Decrease | ⌘+shift+< | |
Increase | ctrl+shift+> | |
Decrease | ctrl+shift+< |
Target | Description |
---|---|
FontSizeMark | Component that holds the html that will wrap the content with font size style. |
FontSizeKeyboardShortcut | Keyboard shortcut file that manipulates onKeyDown event inside SlateJS. |
FontSizeUtils | Generic file that holds the util common functions. |
FontSizeInput | Input component that have behaviour to wrap content with font size style. |
FAQs
SlateJS font size mark plugin.
The npm package @slate-editor/font-size-plugin receives a total of 1,127 weekly downloads. As such, @slate-editor/font-size-plugin popularity was classified as popular.
We found that @slate-editor/font-size-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.