codex-team / codex-team/editor.js

editor.render() not working properly with React Hooks

Open
#1,389 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

### 1) Code Using React State
![with state](https://user-images.githubusercontent.com/46566471/96501143-92e2bb80-126d-11eb-957a-7f8848a3c7ee.PNG)

### Output Of editor.render()
![wso](https://user-images.githubusercontent.com/46566471/96501214-b148b700-126d-11eb-9b9e-43130dba625b.PNG)

####The data after the database call is going in another line. Also, the editor is working differently when using state. When I copy & paste the text, it's getting copied twice.

### 2) Code Without React State

![ns](https://user-images.githubusercontent.com/46566471/96501273-c9203b00-126d-11eb-9258-14cc8ba374b0.PNG)

### Output of editor.render()
![nso](https://user-images.githubusercontent.com/46566471/96501563-261bf100-126e-11eb-9805-5b7d39c4d530.PNG)

It's working fine if I don't use states. But in actual code there is state involved

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.