Back

How to Limit String (substr) in React Js

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

<p>{this.props.service1.content.substr(0, 400)+'...'}</p> // If you are using Ckeditor Content then you can do by follow <p dangerouslySetInnerHTML={{__html: this.props.service1.content && this.props.service1.content.substr(0, 400)+'...'}}></p>