Pasting from Word issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 131
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 2
Description
Hello, thanks for great work.
I've got the latest version of Jodit and Jodit-React (3.4.14 and 1.0.51)
I've got the following issue. If I try to paste sufficient amount of text from Word, I have a popup asking whether I want to preserve Word formatting. And this goes randomly in one of two different ways:
- I get a big popup translated into my language. And everything goes smoothly.
- I get smaller popup with only two buttons ( Yes button is "checked") and text in English and the app throws an error: "Uncaught TypeError: Cannot read property 'on' of undefined"
the error is thrown here:
return t.events.on(c, "click", function () {
If I press any of the buttons (Yes, No) it trows again with: "Uncaught TypeError: Cannot read property 'insertHTML' of undefined"
Here:
i === r.INSERT_AS_TEXT && (e = s.cleanFromWord(e)), i === r.INSERT_ONLY_TEXT && (e = s.stripTags(s.cleanFromWord(e))), t.selection.insertHTML(e), t.setEditorValue();
If I press 'X' pasting is cancelled and you can try again with random result.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Word paste flow in the Jodit React wrapper, focusing on the t.events.on(c, "click", ...) handler and the t.selection.insertHTML(e) call shown in the report. Compare the two popup paths; done means both preserve-formatting choices complete without either reported TypeError and paste succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100