message: added: additional toolbar items to RichTextEditor
diff: @@ -14,6 +14,39 @@ export type RegisterFormProps = {
  name: string
  }
  +const modules = {
  + toolbar: [
  + [{ header: '1' }, { header: '2' }, { header: '2' }],
  + [{ size: [] }],
  + ['bold', 'italic', 'underline', 'strike', 'blockquote'],
  + [{ list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' }],
  + ['link', 'video'],
  + ['clean'],
  + ],
  + clipboard: {
  + // toggle to add extra line breaks when pasting HTML:
  + matchVisual: false,
  + },
  +}
  +/*
  + * Quill editor formats
  + * See https://quilljs.com/docs/formats/
  + */
  +const formats = [
  + 'header',
  + 'size',
  + 'bold',
  + 'italic',
  + 'underline',
  + 'strike',
  + 'blockquote',
  + 'list',
  + 'bullet',
  + 'indent',
  + 'link',
  + 'video',
  +]
  +
  export default function FormRichTextField({ name }: RegisterFormProps) {
  const { t } = useTranslation()
  const [, meta] = useField(name)
  @@ -28,7 +61,12 @@ export default function FormRichTextField({ name }: RegisterFormProps) {
  )}
  <Field name={name}>
  {({ field }: { field: FieldInputProps<string> }) => (
  - <ReactQuill theme="snow" value={field.value} onChange={field.onChange(field.name)} />
  + <ReactQuill
  + modules={modules}
  + theme="snow"
  + value={field.value}
  + onChange={field.onChange(field.name)}
  + />
  )}
  </Field>
  </div>
  