0

Hi , i have a collection of html element to render the output , and i wanna change element tag for eg h2 tag to h4 and then send to the render output markup in react js . I can do them in jquery but wanna try in reactjs .some ideas will be helpful

<fieldset><legend>Clinical Information</legend><h2 style="margin-top:16px;">Summary group</h2><ul><li>Thick</li><li>Black</li><li>Guarding</li><li>Size: small</li><li>Are you sure: yes</li></ul></fieldset>

var markup = this.state.htmlsummary // i get the above markup from a api call 
return <div className="panel panel-info">
                <div className="panel-heading">{this.props.summary.Caption}</div>
                <div className="panel-body">
                    <div style={divStyle} dangerouslySetInnerHTML={markup}></div>
                </div>
            </div>; // renders here in this block

Edited by kamilacbe

2
Contributors
1
Reply
14
Views
1 Week
Discussion Span
Last Post by rproffitt
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.