New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vst-edit

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vst-edit

Vue Simple Text Editor - is a easy-setup WYSIWYG text editor for Vue.js 3 applications

latest
npmnpm
Version
0.2.8
Version published
Maintainers
1
Created
Source

vst-edit

WYSIWYG text editor for Vue 3 alt text

Install

npm i vst-edit

Basic usage

Import VSTEdit component into your project

import {VSTEdit} from 'vst-edit'

Then register VSTEdit component and put it on the page. This text editor could be used in forms without any additional code. Inside the editor creates hidden input with name VSTEditor_input it can be specified by using input-name attribute.

Configuration

Editor can be configured by using following properties:

  • theme : Editor has two color themes: dark and light. Dark theme is set by default. To specify color theme you could use this property. It may accept two values: dark-theme or light-theme
  • input-name : Using this attribute you can change name of the hidden input. It expects string value.
  • display-group-name : Use it to specify if tools group name will be displayed. Expects boolean value. True by default.
  • auto-save : Use it to enable automatic text saving into local storage. Expects boolean value. False by default.
  • auto-save-time : Time interval for text saving. Expects number value in milliseconds If auto save is enabled, auto-save-time is 30000 ms by default.
  • auto-save-identifier : Key name in local storage. Expects string value. If auto save is enabled, auto-save-identifier is __VSTEditor by default.
  • content : You can use that property to push HTML content into the editor.

For example:

<editor theme="dark-theme" input-name="content" :display-group-name="false" :auto-save="true" />

Image loading

Editor supports image loading. To enable this feature you should configure link to image handler. For this type of configuration editor uses Provide / Inject. To specify link to the image handler you need to provide customSettings in one of the top-level components relatively to the editor For example in App.vue:

	provide: {
		customSettings: {
			editorSettings: {
				imageLoadHandler: 'http://your-backend.com/image-handler'
			}
		}
	}

File input name is upload.

Keywords

javascript

FAQs

Package last updated on 24 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts