I'm currently working on developing a custom Visual Studio Code extension. I have implemented a feature where clicking on a button should open a markdown preview with specific content. The code snippet I am using for this functionality is as follows:
let moreInfo = vscode.commands.registerCommand('moreInformation', () => {
const uri = vscode.Uri.file(context.asAbsolutePath('./resources/info.md'));
vscode.commands.executeCommand("markdown.showPreview", uri);
});
Although this code successfully opens the markdown preview, I noticed that double-clicking on the preview allows users to access and modify the source markdown code. Is there a way to make the markdown preview open in read-only mode? Any insights would be greatly appreciated. Thank you.