SmartBlocks
SmartBlocks copied to clipboard
Open and Close children of block - SmartBlocks
✂️ Copy of your #42SmartBlock from Roam
-
#42SmartBlock Close Children-
<%JAVASCRIPTASYNC: ```javascript var parentBlock = document.activeElement.id.split('-').pop(); var thisBlockInfo = await roam42.common.getBlockInfoByUID(parentBlock); var thisBlockInfoString = thisBlockInfo[0][0].string; roam42.common.updateBlock(parentBlock, thisBlockInfoString, false);```%><%NOBLOCKOUTPUT%>
-
-
#42SmartBlock Open Children-
<%JAVASCRIPTASYNC: ```javascript var parentBlock = document.activeElement.id.split('-').pop(); var thisBlockInfo = await roam42.common.getBlockInfoByUID(parentBlock); var thisBlockInfoString = thisBlockInfo[0][0].string; roam42.common.updateBlock(parentBlock, thisBlockInfoString, true);```%><%NOBLOCKOUTPUT%>
-
📋 Describe the SmartBlock
SmartBlocks to open or close all children blocks of a block. Inspired by @zsviczian at https://github.com/roamhacker/SmartBlocks/issues/197 and @eatonpe at https://github.com/roamhacker/SmartBlocks/issues/196.
✅ Describe any prerequisites or dependencies that are required for this SmartBlock
Just Roam42.
📷 Screenshot of your #42SmartBlock workflow/template from Roam
