0.0.1 • Published 2 years ago

plain-text-editor v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

plain-text-editor

A plain text editor (based on textarea)

install

npm install plain-text-editor #npm
yarn add plain-text-editor #yarn
pnpm add plain-text-editor #pnpm

usage

import Editor from 'plain-text-editor';

const editor = new Editor({
  input: document.getElementById('textarea'),
});

// Insert Bulletlist
editor.insertUl();

// Insert OrderedList
editor.insertOl();

// Destory(clear all events)
editor.destory();

options

interface Options {
  input: HTMLTextAreaElement;
  content?: string;
  point?: string;
}