a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

handle pasting checkboxes

+10 -1
+8
components/Blocks/TextBlock/useHandlePaste.ts
··· 218 218 219 219 if (child.tagName === "LI") { 220 220 let ul = Array.from(child.children).find((f) => f.tagName === "UL"); 221 + let checked = child.getAttribute("data-checked"); 222 + if (checked !== null) { 223 + rep.mutate.assertFact({ 224 + entity: entityID, 225 + attribute: "block/check-list", 226 + data: { type: "boolean", value: checked === "true" ? true : false }, 227 + }); 228 + } 221 229 rep.mutate.assertFact({ 222 230 entity: entityID, 223 231 attribute: "block/is-list",
+2 -1
src/utils/getBlocksAsHTML.tsx
··· 35 35 let children = ( 36 36 await Promise.all(l.children.map(async (c) => await renderList(c, tx))) 37 37 ).join("\n"); 38 - return `<li>${await renderBlock(l.block, tx, true)} ${ 38 + let [checked] = await scanIndex(tx).eav(l.block.value, "block/check-list"); 39 + return `<li ${checked ? `data-checked=${checked.data.value}` : ""}>${await renderBlock(l.block, tx, true)} ${ 39 40 l.children.length > 0 40 41 ? ` 41 42 <ul>${children}</ul>