Comments (9)
after adding enableReInitialize
how to add onchange
functioanlity ? i want to get data on Change.
I guess i am implementing in wrong way. here is my sandbox @Jungwoo-An
https://codesandbox.io/s/react-editor-js-h70bb
from react-editor-js.
I was able to fix my problem like this:
const [editorInstance, setEditorInstance] = useState(null);
useEffect(()=>{
if(display && editorInstance){
if(conditions){
editorInstance.clear();
}else{
editorInstance.render(props.data);
}
}
},[props.thatShouldForceUpdates])
//within component
<EditorJs
data={props.data}
instanceRef={instance => setEditorInstance(instance)}
tools={{
...COURSE_TOOLS
}}
/>
from react-editor-js.
@RathanakSreang Hi! First of all, thanks for your interest! ❤️
Can you serve me reproduce link? (ex: codesandbox)
Thanks!
from react-editor-js.
I am having an issue with enableReInitialize prop. I set data to {this.state.blogBody}.
blogBody is initially null as it is awaiting fetch from redux action. The data attribute doesn't work unless I have enableReInitialize prop set to true.
When I set enableReInitialize prop to true, two editors appear with the same blog body in each one.
from react-editor-js.
I'm having a similar problem as kbarnesweb where I see two editors at times, and both only show the loading circle animation. I've successfully initialized with data from the useState hook, but when I use enableReinitialize in order to change the data, I have the problem described above.
from react-editor-js.
I'm sorry for late reply. I will check this issue asap. Thanks!
from react-editor-js.
Hi! I made new PR (#26). I think this issue will be solved after merge PR #26
PR will be merged into master branch by tomorrow at the latest. If anyone have opinion, please PR comment
Thanks!
from react-editor-js.
#26 PR has been merged. So i'll close this issue. If anyone have anything to say, please open issue.
from react-editor-js.
after adding
enableReInitialize
how to addonchange
functioanlity ? i want to get data on Change.
I guess i am implementing in wrong way. here is my sandbox @Jungwoo-An
codesandbox.io/s/react-editor-js-h70bb
You can get changed data after define onChange prop. (Example)
Thanks!
from react-editor-js.
Related Issues (20)
- Chrome: [Violation] Added non-passive event listener... breaking onChange
- React Editor JS in his second version does not render i18n correctly HOT 1
- Can't write anything in editorjs and it comes 0 height HOT 6
- Property or signature expected. TS1131 HOT 1
- Weird symbols appear instead....
- Cannot assign to read only property 'current' of object '#<Object>' HOT 1
- Using multiple ReactEditorJS instances
- How to add a new tool? HOT 1
- Option to add subscript and superscript
- Error: element with ID «editorjs» is missing. Pass correct holder's ID. HOT 4
- Not working with React.StrictMode HOT 7
- Unable to toggle readonly on 2.1.0
- How to change side of the block adding panel?
- How to get stored value?
- expose `renderFromHTML` into the `EditorCore` interface
- Width issue HOT 1
- Render custom tools
- Compatibility issue with react-router-dom
- a
- Scroll top on focusing input element HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-editor-js.