Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

spellCheck and readOnly #780

@oscarmorrison

Description

@oscarmorrison

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I have a toggle to change draftjs window from editable to readonly.
My editor is setup like so:

  <Editor
      editorState = {editorState}
      onChange = {this.onChange}
      handleKeyCommand={this.handleKeyCommand}
      onTab={this.onTab}
      spellCheck={!this.readOnly}
      readOnly={this.readOnly}
  />

The spell check works in editing mode (not-readonly). But when in readOnly mode (when the spellCheck should be disabled) it still shows spelling error.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started:

https://jsfiddle.net/q6ko96mv/1/

What is the expected behavior?

Spell check should be hidden.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

0.9.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions