Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

Fix: bullet and order styling of editor content

Khuram Niaz423b0f43d0cf
diff --git a/src/components/TipTapContentViewer.tsx b/src/components/TipTapContentViewer.tsx
index 1dda0ab..ea739d8 100644
--- a/src/components/TipTapContentViewer.tsx
+++ b/src/components/TipTapContentViewer.tsx
@@ -1,16 +1,34 @@
"use client";
-import { Editor, EditorContent, useEditor } from "@tiptap/react";
+import { EditorContent, useEditor } from "@tiptap/react";
import StarterKit from "@tiptap/starter-kit";
import { useEffect } from "react";
export const TipTapContentViewer = ({ content }: { content: string }) => {
const editor = useEditor({
- extensions: [StarterKit],
+ extensions: [
+ StarterKit.configure({
+ heading: {
+ HTMLAttributes: {
+ class: "text-xl",
+ },
+ },
+ bulletList: {
+ HTMLAttributes: {
+ class: "list-disc pl-4",
+ },
+ },
+ orderedList: {
+ HTMLAttributes: {
+ class: "list-decimal pl-4",
+ },
+ },
+ }),
+ ],
content: "",
editable: false,
});
useEffect(() => {
editor?.commands.setContent(content);
- });
+ }, [content, editor]);
return <EditorContent editor={editor} />;
};