How do I display the content of Quill without the html markup?


Hey everyone,

I managed to get my Quill working, but now I wanted to make a nice splitscreen as we have on this forum but one thing I haven’t been able to figure out is how to convert the input of Quill to nice text on the preview side.

I’m able to display the text but it still has all the html tags which of course I don’t want.

So this is my Quill setup so far:

export default class AddSpark extends Component {
  constructor(props) {

    this.onChange = this.onChange.bind(this);

    this.state ={
      content: '',

  onChange(html) {
    this.setState ({ content: html });

  render() {
    return (
      <Col xs={12} md={6}>
        <form ref={(input) => this.sparkForm = input} onSubmit={(e) => this.createSpark(e)}>

            <ControlLabel>Select your city</ControlLabel>
            <select id="formControlsCity" placeholder="Choose your city" onChange={this.onChange} className="form-control" onClick={ moreOptions } ref={(input) => = input}>
              <option value="select">Choose your city</option>
              <option value="Beijing">Beijing</option>
              <option value="Shanghai">Shanghai</option>
              <option value="Chengdu & Chongqing">Chengdu & Chongqing</option>
            <ControlLabel>Select your person</ControlLabel>
            <select id="formControlsPerson" placeholder="Choose your person" className="form-control" ref={(input) => this.person = input}>
              <option value="select">First select your city</option>

            <ControlLabel>Select your location</ControlLabel>
            <select id="formControlsLocation" placeholder="Choose your location" className="form-control" ref={(input) => this.location = input}>
              <option value="select">First select your city</option>

            <input type="text" label="Title" placeholder="Enter your title" className="form-control" ref={(input) => this.title = input}/>

              <div className='_quill'>
              <br />

          <Button type="submit">Submit</Button>
      <Col xs={12} md={6}>



After doing some more research I was able to find the solution:

To display the content of Quill without the html tags I used this code:

<div dangerouslySetInnerHTML={{__html: this.state.content}}></div>