Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Latest commit

 

History

History
22 lines (17 loc) · 666 Bytes

Readme.md

File metadata and controls

22 lines (17 loc) · 666 Bytes

easyEditor

Get library

  1. clone this repo
  2. cd into it
  3. run npm install
  4. run wepback
  5. go to dist
  6. there is a file easyEditor.js

Usage

command description
easyEditor.init(element:HTMLElement, target?:HTMLElement) makes the content of element editable. Optionally, the target element for the toolbar is defined.
easyEditor.exit() exits edit mode, removes toolbar
easyEditor.get_content() returns content as HTML
easyEditor.set_content(content:string) sets content of editor to content
easyEditor.attach_toolbar() moves toolbar above editable element
easyEditor.detach_toolbar() moves toolbar to the contextmenu