2.6.0 • Published 6 months ago

@editorjs/quote v2.6.0

Weekly downloads
5,105
License
MIT
Repository
github
Last release
6 months ago

npm.io

Quote Tool

Provides Quote Blocks for the Editor.js.

npm.io

Installation

Get the package

yarn add @editorjs/quote

Include module at your application

import Quote from '@editorjs/quote';

Optionally, you can load this tool from CDN JsDelivr CDN.

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    quote: Quote,
  },
  
  ...
});

Or init Quote Tool with additional settings

var editor = EditorJS({
  ...
  
  tools: {
    ...
    quote: {
      class: Quote,
      inlineToolbar: true,
      shortcut: 'CMD+SHIFT+O',
      config: {
        quotePlaceholder: 'Enter a quote',
        captionPlaceholder: 'Quote\'s author',
      },
    },
  },
  
  ...
});

Config Params

FieldTypeDescription
quotePlaceholderstringquote's placeholder string
captionPlaceholderstringcaption's placeholder string

Tool's settings

npm.io

You can choose alignment for the quote. It takes no effect while editing, but saved the «alignment» param.

Output data

FieldTypeDescription
textstringquote's text
captionstringcaption or an author
alignmentstringleft or center
{
    "type" : "quote",
    "data" : {
        "text" : "The unexamined life is not worth living.",
        "caption" : "Socrates",
        "alignment" : "left"
    }
}
byevolution@infinitebrahmanuniverse/nolb-_edi@everything-registry/sub-chunk-277horul-editorhsl-strapi-plugin-react-editorjslourd-componentslourd-components-tlike-water@bigbossstudio/strapi-plugin-editorjs@celmino/sdk-console@celmino/sdk@casimir.one/vue-editorjs@chizhik/ui-lib@brandontle/react-editor.js@softkit/strapi-plugin-react-editorjs@smileeye.edu.vn/editor@todokek/react-editor.js@canburaks/fibs-editor@carabi/ui@tienlucky/storage@creators-view/fluid-ui@datahu/client@datahu/component@datahu/designer@culturehacklabs/genki-reloaded@cromwell/admin-paneldotaila@dicarbene/nuxt3-editorjsdoreacta@emilienkopp/ejs-factory@emilienkopp/html-factory@fakel/rest-admin@highoutput/neyar@hyype-inc/widget@itfin/components@itandu/admin-panel@wulperstudio/wulper-studio-editoreditorjs-preconfigurededitorjs-reacteditorjs-vueeditor-js-componenteditor-js-themefibs-editornode-red-contrib-ui-editornuxt3-editorjsmurph-projectquickvue-editorjsreact-editor-simple-imagereact-editor-simple-image.jssarman-vue-editor-jsreusecoreui-duckumomega-foundationstd-pagesrinstallerssofa-ui-componentsstrapi-plugin-editorstrapi-plugin-editorjsstrapi-plugin-editorjs-fieldstrapi-plugin-k-editorjsstrapi-editorjsstrapi-plugin-react-editorjsstrapi-plugin-react-editorjs-extended-embedstrapi-academy-plus-editorjs@rjgf/rj-components@rypock/react-frontendsmart-editor@techdemocrat/fluid-ui@acf-int/strapi-plugin-editorjs@acf-int/strapi-plugin-react-editorjs@4kda/vuetify-cifrum-demo-app@virtual-spirit/vspace-labs@vt7/vue-editor@keystonejs-contrib/fields-editorjs@zdzcode/zc-web-vuejs-core@zalastax/nolb-_edi@kaniyarasu/react-editor.jsall-in-one-editorjsbyevolution-componentsblock-article-jsblock-json-editor@oak-digital/strapi-plugin-react-editorjs@om-mediaworks/shacl-form@rainyland-dev/strapi-plugin-editorjs@realmocean/sdk@realmocean/editor@questflow/canvas
2.6.0

6 months ago

2.5.0

1 year ago

2.4.0

4 years ago

2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago