mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Merge pull request #24950 from overleaf/dp-writeful-editor-switch
Expose isNewEditor in window.overleaf.unstable.store for use by writefull GitOrigin-RevId: be68b3bc62ea1bfb631f349475888b1153e47cfd
This commit is contained in:
@@ -13,6 +13,7 @@ import { UserSettings, Keybindings } from '../../../../types/user-settings'
|
||||
import getMeta from '@/utils/meta'
|
||||
import useScopeValue from '@/shared/hooks/use-scope-value'
|
||||
import { userStyles } from '../utils/styles'
|
||||
import { canUseNewEditor } from '@/features/ide-redesign/utils/new-editor-utils'
|
||||
|
||||
const defaultSettings: UserSettings = {
|
||||
pdfViewer: 'pdfjs',
|
||||
@@ -43,6 +44,7 @@ type ScopeSettings = {
|
||||
fontSize: number
|
||||
fontFamily: string
|
||||
lineHeight: number
|
||||
isNewEditor: boolean
|
||||
}
|
||||
|
||||
export const UserSettingsContext = createContext<
|
||||
@@ -64,6 +66,7 @@ export const UserSettingsProvider: FC = ({ children }) => {
|
||||
fontFamily,
|
||||
lineHeight,
|
||||
fontSize: userSettings.fontSize,
|
||||
isNewEditor: canUseNewEditor() && userSettings.enableNewEditor,
|
||||
})
|
||||
}, [setScopeSettings, userSettings])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user