我收到这样的错误消息
错误 - ReferenceError:文档未定义
为什么是这样?我从来没有遇到过这样的错误,所以我真的很困惑。请那里的前辈帮忙。
我的代码=
import { useState } from "react";
import dynamic from 'next/dynamic';
import { Quill } from "react-quill";
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
import toolbarOptions from "./toolbar";
import 'react-quill/dist/quill.bubble.css';
const BubbleTheme = Quill.import("themes/bubble");
class ExtendBubbleTheme extends BubbleTheme {
constructor(quill, options) {
super(quill, options);
quill.on("selection-change", (range) => {
if (range) {
quill.theme.tooltip.show();
quill.theme.tooltip.position(quill.getBounds(range));
}
});
}
}
Quill.register("themes/bubble", ExtendBubbleTheme);
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}> …Run Code Online (Sandbox Code Playgroud) 我有这样的条件。我想在按下按钮时启用文本输入,并且可以编辑其中的文本。问题是如何在react js中实现该功能?
我的代码:
function App() {
return (
<div className="App">
<label>URL : </label>
<input
placeholder='http://localhost:3000/123456'
disabled
/>
<button type='submit'>Active</button>
</div>
);
}
export default App;
Run Code Online (Sandbox Code Playgroud)