hackerwins / react-summernote

Summernote (Super simple WYSIWYG editor) adaptation for react
http://summernote.org
MIT License
232 stars 109 forks source link

Difficulty installing this plugin (change suggested) #54

Open FrancisVila opened 5 years ago

FrancisVila commented 5 years ago

I was getting errors when installing this plugin, particularly linked to bootstrap and jquery. I managed to solve them. Here is how. I installed the modules jquery, and bootstrap (not bootstrap-react!) I downloaded bootstrap.min.css and pasted it into the src folder

Here's the App.js I ended up with:

` // the import lines don't show as code, don't know why import React, { Component } from 'react'; import ReactSummernote from 'react-summernote'; import 'react-summernote/dist/react-summernote.css'; // import styles import 'bootstrap' import './bootstrap.min.css' class SummernoteEditor extends Component { onChange(content) { console.log('onChange', content); }

   render() {
     return (
       <ReactSummernote    value="Default value"
      options={{

      width:600,
      dialogsInBody: true,
      toolbar: [
        ['style', ['style']],
        ['font', ['bold', 'underline', 'clear']],
        ['para', ['ul', 'ol', 'paragraph']],
        ['table', ['table']],
        ['insert', ['link', 'picture']],
        ['view', [ 'codeview']]
      ]
    }}
    onChange={this.onChange}
      />
     );
   }
 }
  export default SummernoteEditor;`
codetestmg commented 5 years ago

even i have same question