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.

Document the newly exposed 'editorKey' #1072

@flarnie

Description

@flarnie

We should more clearly document the 'editorKey', especially now that it is exposed as a prop.

Added in c0f2414

It is exposed in order to allow server side rendering - see #822 and #796 for context

Goals:

  1. Add documentation for this new prop. We would merge the PR for updated documentation when releasing v0.10.1.
  2. Add inline comments around 'editorKey' explaining the use a bit. That PR could be merged any time.

I would close this issue after those two are done. But there are some bonus items that we might discuss in the comments:

  1. We should also document a potential 'gotcha' with this prop: If the 'editorKey' is found in text that is copy-pasted then Draft will think that it is an internal paste. I have manually tried to find any bugs this would cause but it doesn't seem to interfere with copy-pasting from within or outside of the Draft editor. But let's look into this and be sure that no issues will be caused.
  2. We might also consider if there is another solution. I don't have ideas off the top of my head but it seems like there could be another way to deal with this issue. Expecting people to set the 'editorKey' prop seems really unintuitive.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions