Open matthiaskrieft opened 8 years ago
+1
+1
+1
+1
+1
@matthiaskrieft: Did you ever find this out?
@poacher2k No, but we'll move on to sTh draft-js based.
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.
@didair
Hello , I want to customized size images when drag images. Please tell me how to customize images size Please.
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?