Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Im trying to render data from the tinyms editor it was showing undefined in console using react js. I want to write some content in the tinyms editor using react js ...please help me with this problem..
- import React, { Component } from 'react';
- import { Editor } from '@tinymce/tinymce-react';
- class AddEvent extends Component {
- constructor() {
- super();
- this.state = {
- content: '',
- };
- this.handleChange=this.handleChange.bind(this);
- this.handleEditorChange=this.handleEditorChange.bind(this.content);
- }
- render() {
- return (
- <form>
- <Editor
- initialValue="<p>This is the initial content of the editor</p>"
- init={{ plugins: 'link image code',
- toolbar: 'undo redo | bold italic| alignleft aligncenter alignright | code'
- }}
- onChange={this.handleEditorChange}
- />
- <div className="col-md-3">
- <button className="btn btn-block btn-primary btn-lg" type="submit">Save Event</button>
- </div>
- </form>
Add Comment
Please, Sign In to add comment