Quote Tool for CodeX.Editor
npm install codex.editor.quote
Provides Quote Blocks for the CodeX Editor.

Get the package
``shell`
npm i --save-dev codex.editor.quote
Include module at your application
`javascript`
const Quote = require('codex.editor.quote');
1. Upload folder dist from repositorydist/bundle.js
2. Add file to your page.
You can load specific version of package from jsDelivr CDN.
https://cdn.jsdelivr.net/npm/codex.editor.quote@2.0.0
Then require this script on page with CodeX Editor.
`html`
Add a new Tool to the tools property of the CodeX Editor initial config.
`javascript`
var editor = CodexEditor({
...
tools: {
...
quote: Quote,
},
...
});
Or init Quote Tool with additional settings
`javascript`
var editor = CodexEditor({
...
tools: {
...
quote: {
class: Quote,
inlineToolbar: true,
shortcut: 'CMD+SHIFT+O',
config: {
quotePlaceholder: 'Enter a quote',
captionPlaceholder: 'Quote\'s author',
},
},
},
...
});
| Field | Type | Description |
| ------------------ | -------- | ----------------------------|
| quotePlaceholder | string | quote's placeholder string |string
| captionPlaceholder | | caption's placeholder string|

You can choose alignment for the quote. It takes no effect while editing, but saved the «alignment» param.
| Field | Type | Description |
| --------- | -------- | -------------------- |
| text | string | quote's text |string
| caption | | caption or an author |string
| alignment | | left or center |
`json``
{
"type" : "quote",
"data" : {
"text" : "The unexamined life is not worth living.",
"caption" : "Socrates",
"alignment" : "left"
}
}