@quanzo/metaparam

1.0.1 • Public • Published

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

  1. Upload folder dist from repository
  2. 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"
    }
}

Package Sidebar

Install

npm i @quanzo/metaparam

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

18.9 kB

Total Files

5

Last publish

Collaborators

  • quanzo