Skip to content

9.0.0

Compare
Choose a tag to compare
@andrerpena andrerpena released this 26 Apr 18:11
· 175 commits to master since this release

PRs:

Breaking changes:

  • className prop is gone. You must now pass classes using the classes object. This prop has been obsolete for a while.
    Example of how to do it now:
          classes={{
            reactMde: "react-mde",
            suggestionsDropdown: "sug-dropdown",
          }}
  • textAreaProps prop is gone. You must now use the childProps. This prop has been obsolete for a while.
    Example of how to do it now:
          childProps={{
            textArea: {
              a: 1
            }
          }}
  • For custom commands, the keyCommand field is gone. This was useless and was left there from the Draft.js times.

New features:

  • Commands can now have async execute functions. This is to facilitate adding the upload image functionality, since I am planning that to be a long running command, under the hoods.
  • Commands now can implement a handleKeyCommand handler. This function will be called for every keydown inside the textarea. If this function returns true, the command will be executed.
  • It is now possible use Cmd+B for bold, Cmd+I for italic and Cmd+k for link as shortcuts.

Fixes

  • getState() added to the TextApi typings