Questions tagged [draftjs]
Draft.js is a framework for building rich text editors in React, powered by an immutable model and abstracting over cross-browser differences.
draftjs
720
questions
0
votes
0
answers
8
views
Why doesn't this replace text in drafjs editor
I'm trying to learn draftjs. I've made an example where if you click a button it's supposed to insert some text in the editor, but I can't understand why it isn't working, clicking the button has no ...
0
votes
0
answers
22
views
DraftJS TypeError: store.getItem(...) is not a function - NextJS
I am using DraftJS Plugins Editor in my NextJS project like below:
const Editor = dynamic(() => import("@draft-js-plugins/editor"), {
ssr: false,
});
const inlineToolbarPlugin = ...
0
votes
0
answers
50
views
How to make react-draft-wysiwyg dropdowns work in Next.js App Router?
I'm trying to integrate react-draft-wysiwyg rich text editor into my next.js project, but I'm having problems with the dropdowns for font, font size, and block type. I don't know what the problem is ...
0
votes
0
answers
37
views
Rich text editor image deletion not working properly
`I have created a custom rich text editor using react-draft-wysiwyg and draft-js. in there I have implemented the image adding functionality too. but when I delete an image by pressing the backspace ...
0
votes
0
answers
30
views
Inline CSS in default value for Draft.js does not work
I have written a tiny component for Drafj.js to have defaultValue prop. Everything works well, But after load defaultValue, Inline css remove from my HTML!
export function Editor({ ...props }) {
...
0
votes
0
answers
19
views
Unable to detect '**' in the starting of string and changing the style of text in the editor after by hiding these characters
import React, { useState, useEffect } from 'react';
import { Editor, EditorState, RichUtils, convertToRaw, convertFromRaw } from 'draft-js';
import 'draft-js/dist/Draft.css';
import './editor.css';
...
0
votes
0
answers
122
views
How to insert Videos react-draft-wysiwyg by toolbarCustomButtons
How to upload videos by custom toolbar in react-draft-wysiwyg?
because the react-draft-wysiwyg toolbar does not have the option of upload video.
my react-draft-wysiwyg vision is 1.13.2
I tried to ...
0
votes
0
answers
92
views
Displaying the output of react-draft-wysiwyg to users as a html
I been attempting to create a blog post web app using reactjs and i am using react-draft-wysiwyg library i been temporary storing the editor content to localstorage but plan to store it on firebase or ...
2
votes
1
answer
233
views
Not able to select text in react-draft-wysiwyg rich text editor
I'm facing an issue in my React version(react: ^18.2.0,) application where I'm using the react-draft-wysiwyg rich text editor. The problem is that I'm unable to select text within the editor. ...
0
votes
1
answer
105
views
draft js editor scrolling issue with new line
The issue is when I press enter, it starts typing on a new line that is initially hidden. However, once I type 2 characters, it suddenly jumps down, making the text visible again.
Here is my lib ...
0
votes
0
answers
44
views
How to create custom block rendering with draft js
I am trying to add custom blocks in the Editor area. I am able to create blocks but not getting the html output of those block elements. I am using "draft-to-html" package to convert the ...
1
vote
0
answers
152
views
How to add custom api key in Draft.js react
This is what i want to achieve but i don't have any idea about draft.js and i have spent lot of time but not getting anything valueable
Typing # as the first string in a line & pressing space ...
0
votes
1
answer
84
views
How to go to next line after pressing ctrl + return while in code block in draftjs
Hi friends i am struggling with draftjs i am using reactjs with draftjs and draftjs-to-code to build richfull text editor i want to implement writing code in text editor for that i am using draftjs-to-...
0
votes
0
answers
54
views
How can I implement draft-js generated html code to my next js app?
I have a web app build using nextJs, in a page I am trying to set html code generated from darftJs using below given code.
<div className="mt-8 leading-7" dangerouslySetInnerHTML={{ ...
0
votes
0
answers
85
views
RichUtils.toggleInlineStyle(editorState, "style") is not working (DRAFT.JS)
import React, { useState } from "react";
import { Editor, EditorState, RichUtils } from "draft-js";
const DraftEditor = () => {
const [editorState, setEditorState] = useState(...