Topic: get content
jamjoublanc
asked a year ago
Expected behavior Get updated content from text area Actual behavior only get the initial content and there is not found way to get the current content Note: with line this.textInput.current.changeViewHandler(); the view changes with click on button , the output '
Hello
when the screen show other content Resources (screenshots, code snippets etc.)import React, { Component } from "react"; import MDBWysiwyg from 'mdb-react-wysiwyg'; import { MDBContainer, MDBRow, MDBCol, MDBBtn } from "mdbreact";
class CreaText extends Component { constructor(props) { super(props); this.textInput = React.createRef(); }
state = { editor: "
Hello
" }handleText = (e) => { console.log(this.textInput.current); console.log(this.textInput.current.props.initialContent); this.textInput.current.changeViewHandler(); this.setState({editor: this.textInput.current.props.initialContent}); console.log(this.state.editor) }
render() { return ( Information
Save ) } } export default CreaText
Jakub Chmura
staff premium answered a year ago
Hi @jamjoublanc,
You did not paste the code correctly. paste the correct code example here. If you have problems formatting in our WYSIWYG editor, paste it into the codeandbox. Then I can help you. Show how you use the MDBWysiwig component and which of the methods built into the component do not work.
best, Kuba
Answered
- User: Free
- Premium support: No
- Technology: React
- MDB Version: 4.21.1
- Device: web
- Browser: Chrome
- OS: windows
- Provided sample code: No
- Provided link: No