[[リーフ (Obsidian)]]を取得して `detach` を呼び出す。 ```ts const firstLeaf = app.workspace.getLeavesOfType("markdown")[0] firstLeaf.detach() ```