uiwjs / uiwjs/react-md-editor

Double quotes("), Ampersand(&), Less Than(<) mark are not outputting correctly in the input area.

Open
#494 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
201
Avg merge
12m
Merged PRs (30d)
1

Description

Hello,
I'm using react-md-editor to create a markdown editor in the React and TypeScript.

This is my dependency:

"dependencies": {
    "@uiw/react-md-editor": "^3.20.5",
    "lodash": "^4.17.21",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-hook-form": "^7.43.5",
    "react-router-dom": "^6.9.0",
    "rehype": "^12.0.1",
    "rehype-rewrite": "^3.0.6",
    "styled-components": "^5.3.8",
    "styled-reset": "^4.4.5"
  },
  "devDependencies": {
    "@types/lodash": "^4.14.191",
    "@types/react": "^18.0.27",
    "@types/react-dom": "^18.0.10",
    "@types/styled-components": "^5.1.26",
    "@vitejs/plugin-react": "^3.1.0",
    "typescript": "^4.9.3",
    "vite": "^4.1.0"
  }

when I write ", &, < in the input area, it will look like the image below.

image

But in the preview, the output is normal.

image

And when I select this text, it is displayed correctly.

select text

I think I saw a similar issue. maybe #318

How can I fix the problem with the input area?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the react-md-editor input area using double quotes, ampersands, and less-than signs, then compare the editor display with its preview and selected-text behavior. The issue is done when these characters display correctly while editing without changing the normal preview output.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.