Skip to content

Commit

Permalink
Fix markdown content recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
yaaax authored Aug 9, 2024
1 parent 6483124 commit 736a281
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions confiture-web-app/src/components/ui/Tiptap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ lowlight.register("ts", ts);
const props = defineProps(["content"]);
const emit = defineEmits(["update:content"]);
//JSON.stringify(document.querySelector(".tiptap").editor.getJSON())
function getContent() {
let jsonContent;
try {
jsonContent = JSON.parse(props.content);
} catch (e) {
return "";
} finally (e) {
return jsonContent;
}
return jsonContent;
}
const editor = useEditor({
Expand Down

0 comments on commit 736a281

Please sign in to comment.