mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[cm6] Improve Tab behaviour in read-only mode (#12715)
* Improve Tab behaviour in read-only mode * Remove Tab shortcuts from Markdown configuration GitOrigin-RevId: 9eb804fcf820b37b371b1c351cfbdf7bff1ced89
This commit is contained in:
@@ -3,6 +3,9 @@ import { getIndentUnit, indentString, indentUnit } from '@codemirror/language'
|
||||
import { EditorView } from '@codemirror/view'
|
||||
|
||||
export const indentMore = (view: EditorView) => {
|
||||
if (view.state.readOnly) {
|
||||
return false
|
||||
}
|
||||
view.dispatch(
|
||||
view.state.changeByRange(range => {
|
||||
const doc = view.state.doc
|
||||
|
||||
Reference in New Issue
Block a user