Fix spellcheck (#1293)

This commit is contained in:
infinite-persistence 2022-04-07 22:39:29 +08:00
commit ee22775c7a
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
2 changed files with 5 additions and 2 deletions

View file

@ -262,7 +262,7 @@ export class FormField extends React.PureComponent<Props, State> {
events={handleEvents}
getMdeInstance={getInstance}
options={{
spellChecker: true,
spellChecker: false,
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
status: [
{
@ -330,6 +330,7 @@ export class FormField extends React.PureComponent<Props, State> {
) : (
<React.Suspense fallback={null}>
<TextareaWithSuggestions
spellCheck
uri={uri}
type={type}
id={name}

View file

@ -58,6 +58,7 @@ type Props = {
value: any,
autoFocus?: boolean,
submitButtonRef?: any,
spellCheck?: boolean,
claimIsMine?: boolean,
slimInput?: boolean,
doResolveUris: (uris: Array<string>, cache: boolean) => void,
@ -92,6 +93,7 @@ export default function TextareaWithSuggestions(props: Props) {
value: messageValue,
autoFocus,
submitButtonRef,
spellCheck,
claimIsMine,
slimInput,
doResolveUris,
@ -105,7 +107,7 @@ export default function TextareaWithSuggestions(props: Props) {
handlePreventClick,
} = props;
const inputDefaultProps = { className, placeholder, maxLength, type, disabled };
const inputDefaultProps = { className, placeholder, maxLength, spellCheck, type, disabled };
const [suggestionValue, setSuggestionValue] = React.useState(undefined);
const [highlightedSuggestion, setHighlightedSuggestion] = React.useState('');