jodit / jodit/jodit-react

hotfix: insert link and source mode on jodit-react are not working

Open
#121 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
406
Forks
131
Avg merge
2h 32m
Merged PRs (30d)
2

Description

Hi, I've cloned the repository, installed and run everything.

The insert link feature doesn't insert anything and the source mode trims the content of the RTE.

linkissue

The source mode is removing all the content from the RTE.

sourcemod

The code that is triggering this behavior is the following:

src/JoditEditor.js

useEffect(() => {
		console.log(`textarea val`, textArea?.current?.value )
		console.log(` val`, value )

		if (textArea?.current?.value !== value) {
			textArea.current.value = value
		}
	}, [value])

cc @xdan @crowmw

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

Start in src/JoditEditor.js and reproduce the insert-link and source-mode problems in the running example. Inspect the value synchronization useEffect and compare the textarea value with the editor content while using both features. Done means inserting a link works and switching to source mode preserves the existing RTE content.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.