Skip to content

Commit

Permalink
works
Browse files Browse the repository at this point in the history
  • Loading branch information
Zewed committed May 20, 2024
1 parent 862c9a8 commit 859fe23
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "@/app/globals.css";
import { EditorContent } from "@tiptap/react";
import { useEffect } from "react";
import "./styles.css";

import { useChatStateUpdater } from "./hooks/useChatStateUpdater";
import { useCreateEditorState } from "./hooks/useCreateEditorState";
Expand Down

This file was deleted.

18 changes: 18 additions & 0 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,22 @@ body.dark_mode {

/* Box Shadow */
--box-shadow: rgba(255, 255, 255, 0.25);
}


.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
color: #adb5bd;
pointer-events: none;
height: 0;
}

.ProseMirror * {
white-space: normal;
word-wrap: break-word;
}

.mention {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ import { useNotesEditorContext } from "@/lib/context/NotesEditorProvider/hooks/u

import styles from "./TipTapEditor.module.scss";

import "@/app/globals.css";

const TipTapEditor = (): JSX.Element => {
const { content, updateContent, expand, setExpand } = useNotesEditorContext();

const tipTapEditor = useEditor({
extensions: [StarterKit],
content,
parseOptions: {
preserveWhitespace: "full",
},
onUpdate: ({ editor }) => {
updateContent(editor.getHTML());
},
Expand Down

0 comments on commit 859fe23

Please sign in to comment.