Open zsviczian opened 3 years ago
Hi,
Somehow I could get the sidebar open. The page is created fine. I think there is some problem with the roam42KeyboardLib.simulateKey(13,100,{ctrlKey:true,shiftKey:true}
part.
I have tried other combination of 79,100 from this https://github.com/dvargas92495/SmartBlocks/issues/190 and it worked.
Could you point me in right direction. THank you.
✂️ Copy of your #42SmartBlock from Roam
42SmartBlock mn - Meet Now
javascript roam42.smartBlocks.activeWorkflow.vars['page_title'] = 'meeting/' + prompt('Subject of the meeting?'); return roam42.dateProcessing.getTime24Format() + ' ['+'['+roam42.smartBlocks.activeWorkflow.vars['page_title']+']]';
%>javascript let inPut = document.getElementById('find-or-create-input'); inPut.focus(); roam42.common.setEmptyNodeValue( inPut, roam42.smartBlocks.activeWorkflow.vars['page_title'] ); setTimeout(()=>{ roam42KeyboardLib.simulateKey(13,100,{ shiftKey:true}); }, 200);
%>📋 Describe the SmartBlock
Inserts current time and [[link to page]] provided in the prompt. Then opens the page in the side bar. I use it to create a new page for ad-hoc meetings during the day.
✅ Describe any prerequisites or dependencies that are required for this SmartBlock
Only Roam42
📷 Screenshot of your #42SmartBlock workflow/template from Roam
💡 Additional Info
https://www.zsolt.blog/2020/12/my-GTD-Meetings-and-ToDo-in-Roam.html