focus on md preview

pull/4485/head
yann300 10 months ago committed by GitHub
parent 22d268a274
commit ca0de421ac
  1. 1
      libs/remix-ui/workspace/src/lib/actions/index.ts

@ -402,6 +402,7 @@ export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'g
if (type === 'file' && path.endsWith('.md')) { if (type === 'file' && path.endsWith('.md')) {
// just opening the preview // just opening the preview
await plugin.call('doc-viewer' as any, 'viewDocs', [path]) await plugin.call('doc-viewer' as any, 'viewDocs', [path])
plugin.call('tabs' as any, 'focus', 'doc-viewer')
} else { } else {
await plugin.fileManager.open(path) await plugin.fileManager.open(path)
dispatch(focusElement([{ key: path, type }])) dispatch(focusElement([{ key: path, type }]))

Loading…
Cancel
Save