react-summernote
react-summernote copied to clipboard
Difficulty installing this plugin (change suggested)
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;`
even i have same question