mirror of
https://github.com/standardnotes/app
synced 2026-10-21 06:03:17 -04:00
feat(clipper): Added "Clip as screenshot" switch to allow clipping content as a screenshot and save it to Files
This commit is contained in:
@@ -29,6 +29,10 @@ export const getSuperJSONFromClipPayload = async (clipPayload: ClipPayload) => {
|
||||
$getRoot().select()
|
||||
$insertNodes(clipSourceParagraphNode)
|
||||
|
||||
if (typeof clipPayload.content !== 'string') {
|
||||
throw new Error('Clip payload content is not a string')
|
||||
}
|
||||
|
||||
const dom = parser.parseFromString(clipPayload.content, 'text/html')
|
||||
const generatedNodes = $generateNodesFromDOM(editor, dom)
|
||||
const nodesToInsert: LexicalNode[] = []
|
||||
|
||||
Reference in New Issue
Block a user