wangzuo / react-medium-editor

React wrapper for medium-editor
https://wangzuo.github.io/react-medium-editor
MIT License
504 stars 93 forks source link

Example for integrating existing medium-editor extensions #21

Open matthiaskrieft opened 8 years ago

matthiaskrieft commented 8 years ago

I currently don't really know where to start with when trying to use some of the existing medium-editor extensions, e.g. from here: https://github.com/yabwe/medium-editor/wiki/extensions-plugins together with the react-medium-editor component.

Does anyone have a snippet that I could base on?

zhaoyao91 commented 8 years ago

+1

wawrzynkiewicz commented 8 years ago

+1

oachoor commented 8 years ago

+1

schroeder commented 8 years ago

+1

ditorahard commented 8 years ago

+1

poacher2k commented 8 years ago

@matthiaskrieft: Did you ever find this out?

matthiaskrieft commented 8 years ago

@poacher2k No, but we'll move on to sTh draft-js based.

didair commented 7 years ago

Heres what i did

import AutoList from 'medium-editor-autolist/dist/autolist.js'; // node_modules/medium-editor-autolist...
var autolist = new AutoList();

then in the options prop for the editor { extensions: { 'autolist': autolist } }, // autolist is a reference to the variable autolist which contains the Autolist function included from the plugin.

Complete component example:

<Editor
   text={ this.props.text }
   onChange={ this.props.onChange }
   options={
    { extensions: { 'autolist': autolist } },
    { placeholder: { text: this.props.placeholder } },
    { toolbar: { buttons: ['h1', 'h2', 'h3', 'bold', 'italic', 'quote', 'pre', 'unorderedlist', 'orderedlist'] } } 
} />

Hope this helps.

Yoottana-Prapbuntarik commented 4 years ago

@didair

Hello , I want to customized size images when drag images. Please tell me how to customize images size Please.