小编Kia*_*sta的帖子

错误 - ReferenceError:文档未定义 NextJS

我收到这样的错误消息

错误 - 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)

reactjs next.js

7
推荐指数
1
解决办法
5947
查看次数

在reactJS / nextJS中启用禁用按钮输入

我有这样的条件。我想在按下按钮时启用文本输入,并且可以编辑其中的文本。问题是如何在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)

reactjs next.js

6
推荐指数
1
解决办法
5854
查看次数

angerlysetinnerhtml nextJS 标签 &lt;p&gt;

我在 nextJS 中执行时遇到问题dangerouslySetInnerHTML。我想删除<p>标签,但是当它重新加载时,它甚至不会出现在屏幕上。这是我的代码

在此输入图像描述

reactjs next.js

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

next.js ×3

reactjs ×3