Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Darginec05 committed Oct 31, 2024
1 parent 35395d0 commit f9d86ab
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 115 deletions.
10 changes: 10 additions & 0 deletions packages/core/editor/src/parsers/deserializeTextNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ export function deserializeTextNodes(editor: YooEditor, nodes: NodeListOf<ChildN
});
}

if (element.nodeName === 'MARK') {
const color = element.style.color;

deserializedNodes.push({
// @ts-ignore [FIXME] - Fix types
highlight: { color: color || 'yellow' },
...deserializeTextNodes(editor, element.childNodes)[0],
});
}

if (element.nodeName === 'A') {
deserializedNodes.push({
id: generateId(),
Expand Down
42 changes: 21 additions & 21 deletions web/next-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
"@types/js-beautify": "^1.14.3",
"@uiw/codemirror-theme-vscode": "^4.21.24",
"@uiw/react-codemirror": "^4.21.25",
"@yoopta/accordion": "4.9.0",
"@yoopta/action-menu-list": "4.9.0",
"@yoopta/blockquote": "4.9.0",
"@yoopta/callout": "4.9.0",
"@yoopta/code": "4.9.0",
"@yoopta/divider": "4.9.0",
"@yoopta/editor": "4.9.0",
"@yoopta/embed": "4.9.0",
"@yoopta/exports": "4.9.0",
"@yoopta/file": "4.9.0",
"@yoopta/headings": "4.9.0",
"@yoopta/image": "4.9.0",
"@yoopta/link": "4.9.0",
"@yoopta/link-tool": "4.9.0",
"@yoopta/lists": "4.9.0",
"@yoopta/marks": "4.9.0",
"@yoopta/paragraph": "4.9.0",
"@yoopta/starter-kit": "^4.7.1-alpha.3",
"@yoopta/table": "4.9.0",
"@yoopta/toolbar": "4.9.0",
"@yoopta/video": "4.9.0",
"@yoopta/accordion": "4.9.1",
"@yoopta/action-menu-list": "4.9.1",
"@yoopta/blockquote": "4.9.1",
"@yoopta/callout": "4.9.1",
"@yoopta/code": "4.9.1",
"@yoopta/divider": "4.9.1",
"@yoopta/editor": "4.9.1",
"@yoopta/embed": "4.9.1",
"@yoopta/exports": "4.9.1",
"@yoopta/file": "4.9.1",
"@yoopta/headings": "4.9.1",
"@yoopta/image": "4.9.1",
"@yoopta/link": "4.9.1",
"@yoopta/link-tool": "4.9.1",
"@yoopta/lists": "4.9.1",
"@yoopta/marks": "4.9.1",
"@yoopta/paragraph": "4.9.1",
"@yoopta/starter-kit": "4.9.1",
"@yoopta/table": "4.9.1",
"@yoopta/toolbar": "4.9.1",
"@yoopta/video": "4.9.1",
"class-variance-authority": "^0.7.0",
"classnames": "^2.5.1",
"clsx": "^2.1.0",
Expand Down
Loading

0 comments on commit f9d86ab

Please sign in to comment.