Skip to content

Commit

Permalink
Fix markdown content recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
yaaax committed Aug 16, 2024
1 parent 6483124 commit 20632e8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 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;
let jsonContent = props.content;
try {
jsonContent = JSON.parse(props.content);
} catch (e) {
return "";
} finally {
return jsonContent;
}
return jsonContent;
}
const editor = useEditor({
Expand Down

0 comments on commit 20632e8

Please sign in to comment.