1.1.1 • Published 12 months ago

@maitrakhatri/editorjs-simple-image v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Simple Image Tool (without Caption)

Provides Image Blocks (without Caption) for the Editor.js.

Works for Image drag n drop, pasting images from clipboard and requires no server-side uploader.

Installation

Install via NPM

Get the package

npm i @maitrakhatri/editorjs-simple-image

Include module at your application

const SimpleImage = require('@maitrakhatri/editorjs-simple-image');

OR

import SimpleImage from "@maitrakhatri/editorjs-simple-image";

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    image: SimpleImage,
  }
  
  ...
});

Config Params

This Tool has no config params

Tool's settings

npm.io

  1. Add border

  2. Stretch to full-width

  3. Add background

Output data

FieldTypeDescription
urlstringimage's url
withBorderbooleanadd border to image
withBackgroundbooleanneed to add background
stretchedbooleanstretch image to screen's width
{
    "type" : "image",
    "data" : {
        "url" : "https://www.tesla.com/tesla_theme/assets/img/_vehicle_redesign/roadster_and_semi/roadster/hero.jpg",
        "withBorder" : false,
        "withBackground" : false,
        "stretched" : true
    }
}
1.1.1

12 months ago

1.1.0

12 months ago

1.0.0

12 months ago