/* ![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-download-raw.jpg) Download this file and save to your Obsidian Vault including the first line, or open it in "Raw" and copy the entire contents to Obsidian. ![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-grid.jpg) The default grid size in Excalidraw is 20. Currently there is no way to change the grid size via the user interface. This script offers a way to bridge this gap. See documentation for more details: https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html ```javascript */ const grid = parseInt(await utils.inputPrompt("Grid size?",null,"20")); if(isNaN(grid)) return; //this is to avoid passing an illegal value to Excalidraw const api = ea.getExcalidrawAPI(); let appState = api.getAppState(); appState.gridSize = grid; api.updateScene({ appState, commitToHistory:false });