Editor

1.1.0

The Editor component was built using the Lexical API and was developed to be used in rich text fields.

import React from "react";
import dynamic from "next/dynamic";

const Editor = dynamic(() => import("@nimbus-ds/editor"), { ssr: false });

const Example: React.FC = () => {
  return <Editor />;
};

export default Editor = dynamic(() => import("@nimbus-ds/editor"), { ssr;

Refer to the Lexical API documentation to understand how to implement the <Editor> component.

Instale o componente via terminal.

npm install @nimbus-ds/editor

Additional props are passed to the <Editor> element. See div docs for a list of props accepted by the <Editor> element.

Editor

NameTypeDefaultDescription

modules

'bold'
'clearFormating'
'divider'
'header'
'history'
'italic'
'link'
'orderedList'
'unorderedList'
'video'

placeholder

string

value

string

parser

'html'
'json'

theme

object

onChange

object

helpIcon

React.FC<IconProps>

Icon supporting the help text message.

helpText

string

Help text displaying optional hints or validation messages under the field.

appearance

'danger'
'none'
'success'
'warning'

'none'

Appearance of the field and help text elements.

translations

object