Skip to content

MarkdownEditor followup work #2231

@iansan5653

Description

@iansan5653

As the MarkdownEditor component gets used in more places, we'll naturally identify some followup tasks to complete after the initial draft release. Personally I need to shift focus back to some other priorities so I can't tackle these myself right now, which is why I wanted to catalog them somewhere:

  • Consumers should only be able to use refs of the exact type Ref<MarkdownEditorHandle> (currently any ref assignable to that type is allowed, which enables consumers to incorrectly use Ref<HTMLTextAreaElement> accidentally)
  • The component should log an error if no MarkdownEditor.Label child is found - this creates a fieldset with no legend
  • Users should be able to switch between view/edit modes with Cmd+Shift+P
  • The task list icon should be updated to be consistent with the new icon used in the Rails-based editor (task list instead of checkbox)
    • Will be automatically fixed when @primer/octicons-react is updated
  • All examples in the MarkdownViewer docs have TypeError: Cannot read properties of undefined (reading '__html')

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions