Skip to content

Commit

Permalink
feat: Save and render rich text (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker authored Dec 4, 2024
1 parent 9bcdce2 commit 1469449
Show file tree
Hide file tree
Showing 11 changed files with 386 additions and 209 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-days-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"namesake": patch
---

Fix rich text rendering and saving
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ node_modules

# Private keys
.env
.env.local
.npmrc

# Local files
*.local
10 changes: 10 additions & 0 deletions convex/quests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ export const setTimeRequired = userMutation({
},
});

export const setContent = userMutation({
args: {
questId: v.id("quests"),
content: v.string(),
},
handler: async (ctx, args) => {
await ctx.db.patch(args.questId, { content: args.content });
},
});

export const softDelete = userMutation({
args: { questId: v.id("quests") },
handler: async (ctx, args) => {
Expand Down
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,24 @@
"@pdfme/schemas": "^5.2.8",
"@pdfme/ui": "^5.2.8",
"@tanstack/react-router": "^1.85.0",
"@tiptap/extension-blockquote": "^2.10.3",
"@tiptap/extension-bold": "^2.10.3",
"@tiptap/extension-bullet-list": "^2.10.3",
"@tiptap/extension-document": "^2.10.3",
"@tiptap/extension-hard-break": "^2.10.3",
"@tiptap/extension-heading": "^2.10.3",
"@tiptap/extension-history": "^2.10.3",
"@tiptap/extension-italic": "^2.10.3",
"@tiptap/extension-link": "^2.10.3",
"@tiptap/extension-list-item": "^2.10.3",
"@tiptap/extension-list-keymap": "^2.10.3",
"@tiptap/extension-ordered-list": "^2.10.3",
"@tiptap/extension-paragraph": "^2.10.3",
"@tiptap/extension-placeholder": "^2.10.3",
"@tiptap/extension-text": "^2.10.3",
"@tiptap/extension-typography": "^2.10.3",
"@tiptap/pm": "^2.10.3",
"@tiptap/react": "^2.10.3",
"@tiptap/starter-kit": "^2.10.3",
"convex": "^1.17.3",
"convex-helpers": "^0.1.65",
"framer-motion": "^11.12.0",
Expand Down Expand Up @@ -76,7 +91,6 @@
"@storybook/react": "^8.4.6",
"@storybook/react-vite": "^8.4.6",
"@storybook/test": "^8.4.6",
"@tailwindcss/typography": "^0.5.15",
"@tanstack/router-devtools": "^1.85.0",
"@tanstack/router-plugin": "^1.84.4",
"@testing-library/dom": "^10.4.0",
Expand Down
Loading

0 comments on commit 1469449

Please sign in to comment.