@quanzo/metaparam
v1.0.1
Published
Meta tags Tool for Editor.js
Downloads
6
Maintainers
Readme
Meta tags tool
Provides page meta tags for the CodeX Editor. Block has title, description and keywords.
Installation
Install via NPM
Get the package
npm i --save-dev @quanzo/metaparam
Include module at your application
const Metaparam = require('@quanzo/metaparam');
Download to your project's source dir
- Upload folder
dist
from repository - Add
dist/editor.metaparam.js
file to your page.
Load from CDN
You can load specific version of package from jsDelivr CDN.
https://cdn.jsdelivr.net/npm/@quanzo/metaparam@latest
Then require this script on page with CodeX Editor.
<script src="..."></script>
Usage
Add a new Tool to the tools
property of the CodeX Editor initial config.
var editor = CodexEditor({
...
tools: {
...
metaparam: Metaparam,
},
...
});
Or init Metaparam Tool with additional settings
var editor = CodexEditor({
...
tools: {
...
metaparam: {
class: Metaparam,
config: {
titlePlaceholder: 'Title',
descriptionPlaceholder: 'Description',
keywordsPlaceholder: 'Keywords',
},
},
},
...
});
Output data
| Field | Type | Description |
| --------- | -------- | -----------------|
| title | string
| title |
| description | string
| description |
| keywords | string
| keywords |
{
"type" : "metaparam",
"data" : {
"title" : "Page title",
"description" : "Avoid using this method just for lulz. It can be very dangerous opposite your daily fun stuff.",
"keywords" : "keywords"
}
}