jamjoublanc free asked 2 years 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 answered 2 years 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



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.21.1
  • Device: web
  • Browser: Chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No