dvargas92495 / SmartBlocks

Useful examples from developer community for Roam42 SmartBlocks
147 stars 7 forks source link

Find and Replace SmartBlock. Replace a string in a block with another string. #118

Open GitMurf opened 3 years ago

GitMurf commented 3 years ago

✂️ Copy of your 42SmartBlock from Roam

📋 Describe the SmartBlock

Just posted a new SmartBlock for Find/Replace in your current block! First popup input asks what you want to "find" and the second input asks what you want to "replace" it with.

I also created a "hardcoded" version so you can set it to find/replace something and not require a popup input each time. Good if you have several of the same things you want to replace on several blocks and quickly want to go through the blocks and find/replace with the same things.

✅ Describe any prerequisites or dependencies that are required for this SmartBlock

roam42

📷 Screenshot of your 42SmartBlock workflow/template from Roam

💡 Additional Info


[label_example]

GitMurf commented 3 years ago

This can be used to fix Wiki links too based on this issue #117

cobblepot1 commented 3 years ago

Thanks for this! Lack of search/replace function in Roam is a huge problem you are helping to address.

Can the smartblock be modified to include all child blocks, so you don't have to run it in each block manually? That would make it much more useful.

Later enhancements could include allowing skip/confirm replace for each instance of the string.