{children}; - case "bulleted-list": - return
{children}
; - } -}; - -export default Element; diff --git a/src/common/component/RichInput/index.js b/src/common/component/RichInput/index.js deleted file mode 100644 index eff90b07..00000000 --- a/src/common/component/RichInput/index.js +++ /dev/null @@ -1,118 +0,0 @@ -// import React from "react"; -// import styled from 'styled-components'; -import AutoReplace from "slate-auto-replace"; -import { useState, useRef, useCallback, useMemo, useEffect } from "react"; -import { serialize } from "remark-slate"; -import { Slate, Editable, withReact } from "slate-react"; -import { createEditor, Transforms, Editor } from "slate"; -import { withHistory } from "slate-history"; -import { useKey } from "rooks"; -import Styled from "./styled"; - -import initialValue, { emptyValue } from "./initialValue"; -import Element from "./Element"; -// import withShortcuts from "./withShortcuts"; - -// Add the plugin to your set of plugins... -const plugins = [ - AutoReplace({ - trigger: "space", - before: /^(>)$/, - change: (change, e, matches) => { - return change.setBlocks({ type: "blockquote" }); - }, - }), -]; - -export default function RichInput({ - setEditor, - placeholder = "Write some markdown...", - updateMarkdown, - updatePureText, - sendMessage, -}) { - const editableRef = useRef(null); - const [shift, setShift] = useState(false); - const [value, setValue] = useState(emptyValue); - // const renderElement = useCallback((props) =>