1.8.1 • Published 11 months ago

@victr/pocket-editor v1.8.1

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

This is yet another wysiwyg editor, it focuses mainly on two things:

  • Very fast load time
  • Reliable markdown output

Install

npm install pocket-editor

What you can do

function pocketEditor(string): {
  get: () => string;
  set: (string) => void;
  oninput: (Function) => void;
}

How to use

<body>
  <div id="wrapper"></div>
</body>
import pocketEditor from "pocket-editor"
import "pocket-editor/dist/style.css"

const editor = pocketEditor("wrapper")

editor.set("## Hello world !!")

editor.oninput(function logToConsole() {
  const content = editor.get()
  console.log(content)
})