Editor to edit a css style or a javascript code

UI Components for React
Post Reply
luca.stancapiano
Posts: 14
Joined: 18 Jun 2018, 14:52

25 Jun 2019, 16:32

can I use the primereact editor to edit a css style or a javascript code? Can I manage the colors with the chosen syntax?

luca.stancapiano
Posts: 14
Joined: 18 Jun 2018, 14:52

28 Jun 2019, 15:13

Trying this code:

Code: Select all

import {Editor} from 'primereact/editor';
      ......
const editorHeader = (<span className="ql-formats"/>);
       .....
<Editor headerTemplate={editorHeader} rows={16} cols={35} value={this.state.cssStyle} 
						onTextChange={(e) => this.setState({cssStyle: e.htmlValue})} modules= {{syntax: true}}/>
I get the error:

Error: Syntax module requires highlight.js. Please include the library on the page before Quill.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest