📜  富编辑器反应 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:49.354000             🧑  作者: Mango

代码示例1
import React, { useState, useRef } from "react";
import JoditEditor from "jodit-react";
import "./styles.css";

export default function App() {
  const editor = useRef(null);
  const [content, setContent] = useState("Start writing");
  const config = {
    readonly: false,
    height: 400
  };
  const handleUpdate = (event) => {
    const editorContent = event.target.innerHTML;
    setContent(editorContent);
  };

  return (
    

React Editors

Start editing to see some magic happen!

{}} />
); }