Skip to content

A rich-text editor for Vue & React base on Prosemirror

Notifications You must be signed in to change notification settings

yuanchangjian/EasyEditor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyEditor

A rich-text editor for Vue & React base on Prosemirror

EasyEditor-React

Useage

import React from 'react';
import EasyEditor from 'easy-editor-react';

const options = {
    autoFocus: true,
    viewInstance: (view) => {
        console.log('react view', view);
    }
}

export default () => <EasyEditor {...options} />

Props

  • autoFocus - Auto focus

  • injectEditableCSS - Inject editable mode CSS

    • basic wrapper class name called ProseMirror

    • example

      .ProseMirror {
          outline: none
      }
  • injectPreviewCSS - Inject disabled mode CSS

    • example
      .ProseMirror {
          outline: 1px solid #329FD9;
      }
  • viewInstance - Instance of prosemirror view

    • state - Prosemirror state

    • focused - Focus status

    • dom - Root DOM

    • dragging - Draging Element

    • lastClick - Last click information

      • time - The time stamp
      • x - Position x of mouse
      • y - Position y of mouse
      • type - Single click or double click
    • editable - Can editor or not

    • ......

About

A rich-text editor for Vue & React base on Prosemirror

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • CSS 0.2%