MCPcopy Index your code
hub / github.com/editablejs/editable / fragmentToString

Function fragmentToString

packages/editor/src/utils/data-transfer.ts:21–24  ·  view source on GitHub ↗
(fragment: Descendant[])

Source from the content-addressed store, hash-verified

19 * @returns string representation of the fragment
20 **/
21export const fragmentToString = (fragment: Descendant[]) => {
22 const string = JSON.stringify(fragment)
23 return window.btoa(encodeURIComponent(string))
24}
25
26/**
27 * Parse fragment from string

Callers 2

withDataTransferFunction · 0.90
setDataTransferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…