Merge pull request #16139 from overleaf/ii-ide-page-prototype-review-panel-line-height
[web] React ide page line height GitOrigin-RevId: da8c9cd178bc089fdc208abd1c453f7666ff58b1
This commit is contained in:
@@ -36,7 +36,10 @@ import {
|
||||
resetLearnedWords,
|
||||
setSpelling,
|
||||
} from '../extensions/spelling'
|
||||
import { createChangeManager } from '../extensions/changes/change-manager'
|
||||
import {
|
||||
createChangeManager,
|
||||
dispatchEditorEvent,
|
||||
} from '../extensions/changes/change-manager'
|
||||
import { setKeybindings } from '../extensions/keybindings'
|
||||
import { Highlight } from '../../../../../types/highlight'
|
||||
import { EditorView } from '@codemirror/view'
|
||||
@@ -171,14 +174,7 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
|
||||
useEffect(() => {
|
||||
if (lineHeight && fontSize) {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('editor:event', {
|
||||
detail: {
|
||||
type: 'line-height',
|
||||
payload: lineHeights[lineHeight] * fontSize,
|
||||
},
|
||||
})
|
||||
)
|
||||
dispatchEditorEvent('line-height', lineHeights[lineHeight] * fontSize)
|
||||
}
|
||||
}, [lineHeight, fontSize])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user