我正在使用react- quill npm 包并在 nextjs 中动态导入它,我也在使用 create-next-app 样板。我能够让 react-quill 编辑器工作,但我无法获得使用工具栏中的对齐按钮设置的图像样式/段落样式并重新显示内容 - 图像/段落。
用例:
预期:图像/段落内容仍应右对齐/居中/对齐。
实际:图像/段落内容已删除所有样式属性。
下面是我的代码,如何在nextjs中为react-quill的图像/段落注册样式是我的问题
import { useState,useEffect } from 'react'
import Router from 'next/router'
import dynamic from 'next/dynamic'
import { withRouter } from 'next/router' // used to get access to props of react-dom
import { getCookie,isAuth } from '../../actions/auth';
import { createBlog } from '../../actions/blog'
// dynamically importing react-quill
const ReactQuill = dynamic( ()=> import('react-quill'), {ssr:false} ) …Run Code Online (Sandbox Code Playgroud)