Questions tagged [react-draft-wysiwyg]
167 questions
                    
                    14
                    
            votes
                
                4 answers
            
        window is not defined - react-draft-wysiwyg used with next js (ssr)
I am working on a rich text editor used for converting plain html to editor content with next js for ssr. I got this error window is not defined so I search a solution to this github link
It used a dynamic import feature of next js.
Instead of…
         
    
    
        elpmid
        
- 872
- 1
- 6
- 18
                    7
                    
            votes
                
                1 answer
            
        How to remove default option in toolbar of react-draft-wysiwyg?
According my question, I want to remove some default toolbar option like a font family or emoji and remain only text style options. How to do that ?
For my editor.
        
            
            
                
                    
    
    
         
    
    
                
            
        
     
 
    
    
        Nawin P.
        
- 223
- 1
- 4
- 11
                    6
                    
            votes
                
                1 answer
            
        Why do I get a blank page when I click on my textarea zone with react-wysiwyg?
After getting the API response inside MenuItemDetail, I set it to the responses state, which is then passed down to Tabs, then TabContent. Here, I want to read  correctly its resp and name props then display whatever they contain in the two…
         
    
    
        Zokulko
        
- 211
- 4
- 25
                    5
                    
            votes
                
                3 answers
            
        How can I set defaultValue on react draft wysiwyg
I have a property product_des on my database where all the content of react draft wysiwyg store. I want to set the default value on my editor from the database.
//State
    const [onEditorStateChange, setOnEditorStateChange] = useState()
   … 
         
    
    
        Jerin
        
- 717
- 1
- 7
- 28
                    5
                    
            votes
                
                2 answers
            
        react-draft-wysiwyg - Warning: Can't call setState
I did make a simple react app with react-draft-wysiwyg, but I get a warning.
import React from "react";
import ReactDOM from "react-dom";
import { Editor } from "react-draft-wysiwyg";
import…
         
    
    
        Alexander Juhl
        
- 147
- 2
- 11
                    5
                    
            votes
                
                2 answers
            
        use formik on react-draft-wysiwyg
I am using formik for my forms. I wanted to implement react-draft-wysiwyg editor with formik. However, I found following warning in my case.
Warning: Formik called `handleBlur`, but you forgot to pass an `id` or `name` attribute to your…
         
    
    
        Serenity
        
- 3,884
- 6
- 44
- 87
                    4
                    
            votes
                
                3 answers
            
        Using DraftJS in a Functional Component
I am trying to implement DraftJS within an existing functional component and I am unable to figure out how to do this. It appears that all of the documentation and user-submitted content refers to class components.
I try to set it up using the…
         
    
    
        Sam
        
- 1,130
- 12
- 36
                    4
                    
            votes
                
                1 answer
            
        Draft.js (react-draft-wysiwyg): text update from the outside of the Editor component does not work
I'm trying to update the text from a calling component into the Editor component. I use the props to pass the text from the caller, but when the text change (props is updated in the ContentEditor) the text in the Editor component is not:
Here is the…
         
    
    
        robob
        
- 1,739
- 4
- 26
- 44
                    4
                    
            votes
                
                3 answers
            
        React-Draft-Wysiwyg: Autoscroll on new line
How can I make editor's input to scroll down automatically on new line input? Like in example 6 at https://jpuri.github.io/react-draft-wysiwyg/#/demo. Now scroll stays on top and text cursor hides when goes below bottom border.
         
    
    
        fihis
        
- 41
- 1
- 3
                    4
                    
            votes
                
                1 answer
            
        Q: React-Draft-Wysiwyg How to add custom label to blockTypes?
Im trying to setup custom labels for blockType in react-draft-wysiwyg.
According to this pool request
I should be able to add displayName property to editor toolbar configuration object.
I tried to implement this like that, but unfortunately it does…
         
    
    
        Space
        
- 178
- 2
- 10
                    3
                    
            votes
                
                0 answers
            
        problem about Draft-js when remove images by Backspace key
When deleting an image with text in the draft.js editor for image upload, occasionally the IMAGE entity remains even though the image was not rendering on the editor. This causes problems when converting that state into HTML because it appears that…
         
    
    
        Hasham Minhas
        
- 61
- 6
                    3
                    
            votes
                
                4 answers
            
        Dropdowns are not working using react-draft-wysiwyg in React JS
I tried to use react-draft-wysiwyg using the docs
Some icons are displayed but not working : block type, font, font size,pickerColor (the dropdowns are not working). For example, the font size is set to 16 by defauft, but I can't change it...
import…
         
    
    
        Zokulko
        
- 211
- 4
- 25
                    3
                    
            votes
                
                0 answers
            
        Set a default content from database in react-draft-wysiwyg editor
I am creating a blog website in which I am embedding react-draft-wysiwyg editor. I am facing problem when the user has to update the blog. When I click the update button the content is gone. I looked into many solutions but I couldn't make it…
         
    
    
        Kanupriya Ishu
        
- 41
- 3
                    3
                    
            votes
                
                2 answers
            
        Draft-js JSON to EditorState does not update
So, I used Draft-js to create blog posts. When a user creates a post, the data is converted to a string and sent to the server to be saved. I converted the draft-js EditorState like…
         
    
    
        Paul Bekaert
        
- 81
- 1
- 10
                    3
                    
            votes
                
                0 answers
            
        Draft.js data is not sent to the server in React
I am using Draft.js editor for my project which is linked with a 
         
    
    
        ItsHarsh.json
        
- 168
- 9