mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
Use editor-preference-select for spell check (#694)
This commit is contained in:
parent
5197d0512b
commit
819b36a137
3 changed files with 8 additions and 12 deletions
|
@ -386,7 +386,7 @@
|
|||
"keyMap": "Keymap",
|
||||
"indentWithTabs": "Tab character",
|
||||
"indentUnit": "Tab size (when using spaces)",
|
||||
"spellChecker": "Spell checking"
|
||||
"spellcheck": "Spell checking"
|
||||
}
|
||||
},
|
||||
"embeddings": {
|
||||
|
|
|
@ -7,7 +7,8 @@ export enum EditorPreferenceProperty {
|
|||
KEYMAP = 'keyMap',
|
||||
THEME = 'theme',
|
||||
INDENT_WITH_TABS = 'indentWithTabs',
|
||||
INDENT_UNIT = 'indentUnit'
|
||||
INDENT_UNIT = 'indentUnit',
|
||||
SPELL_CHECK= 'spellcheck'
|
||||
}
|
||||
|
||||
export interface EditorPreferenceSelectProps {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { EditorConfiguration } from 'codemirror'
|
|||
import equal from 'fast-deep-equal'
|
||||
import React, { Fragment, useCallback, useState } from 'react'
|
||||
import { Button, Form, ListGroup } from 'react-bootstrap'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { ApplicationState } from '../../../../../redux'
|
||||
import { setEditorPreferences } from '../../../../../redux/editor/methods'
|
||||
|
@ -55,15 +55,10 @@ export const EditorPreferences: React.FC = () => {
|
|||
<EditorPreferenceSelect onChange={sendPreferences} preferences={preferences} property={EditorPreferenceProperty.INDENT_UNIT}/>
|
||||
</ListGroup.Item>
|
||||
<ListGroup.Item>
|
||||
<Form.Group controlId='editorSpellChecker'>
|
||||
<Form.Label>
|
||||
<Trans i18nKey='editor.modal.preferences.spellChecker'/>
|
||||
</Form.Label>
|
||||
<Form.Control as='select' size='sm' onChange={() => alert('This feature is not yet implemented.')}>
|
||||
<option value='off'>off</option>
|
||||
<option value='en'>English</option>
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
<EditorPreferenceSelect onChange={() => alert('This feature is not yet implemented.')} preferences={preferences} property={EditorPreferenceProperty.SPELL_CHECK}>
|
||||
<option value='off'>off</option>
|
||||
<option value='en'>English</option>
|
||||
</EditorPreferenceSelect>
|
||||
</ListGroup.Item>
|
||||
</ListGroup>
|
||||
</Form>
|
||||
|
|
Loading…
Reference in a new issue