mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 07:37:10 +00:00
Fix ace editor tab size
This commit is contained in:
@@ -108,8 +108,8 @@ export function SourcePanel({ name, model, blockStates, doCopy, doDownload, doIm
|
||||
}, [model])
|
||||
|
||||
useEffect(() => {
|
||||
const softTabs = indent === 'tabs' ? false : INDENT[indent]
|
||||
editor.current.setOption('useSoftTabs', softTabs)
|
||||
editor.current.setOption('useSoftTabs', indent !== 'tabs')
|
||||
editor.current.setOption('tabSize', indent === 'tabs' ? 4 : INDENT[indent])
|
||||
editor.current.getSession().setMode(`ace/mode/${format}`)
|
||||
retransform.current()
|
||||
}, [indent, format])
|
||||
|
||||
Reference in New Issue
Block a user