Questions tagged [draft-js-plugins]
123 questions
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
0 answers
Facing issues with Draft JS in android browsers
We are using draftJS for creating a rich text post/comment with user mention(draft-js-mention-plugin), and hashtag(draft-js-hashtag-plugin) functionality. Following is the code sample.

Gaurav Suman
- 31
- 2
3
votes
1 answer
React Draft.js Wysiwyg: How to programmatically insert text at the cursor location?
I am using the React Draft Wysiwyg and I need to insert arbitrary text from one component of my application into the editor component. I am doing this via the clipboard as an intermediary for the transfer from one component to the other. But the…

dchosen1
- 163
- 1
- 7
3
votes
1 answer
How to get the mentioned users from react draft-js-mention-plugin?
I gone through the documentation of draft-js-mention-plugin but couldn't figure a way to read all the mentions from the content. Is there a way can find all the mentions as array?. I need to store all the mentions seperately and send email.Your help…

Manju
- 59
- 7
3
votes
0 answers
How to import html css class attribute (aka className in React) into Draft.js EditorState?
I want to import or paste a simple html-fragment with class-name attributes, so that the classes are parsed and active within the Draft.js editor.
This parsing and setting of the class-name should be independent of the html-tag type, e.g.
,…

Matze Bär
- 31
- 3
3
votes
1 answer
How to render the entity map of type LINK of draft js in my react component?
I have this data in my redux store which I want to render in my react component .
{
"entityMap":{
"0":{
"type":"LINK",
"mutability":"MUTABLE",
"data":{"url":"www.google.co.in"}
}
},
"blocks":[
…

Suraj Sharma
- 180
- 5
- 15
3
votes
1 answer
Image not showing in react-draft-wysiwyg editor using draft js
I am using react-draft-wysiwyg text editor based on draft js in my application. I am facing some issues while trying to upload image via the editor image control. I am using the custom FileUploader Component. It is saving the image in the server…

Shrawan Lakhe
- 31
- 1
- 4
3
votes
1 answer
React & Draft.js - ConvertFromRaw not displaying "INLINETEX"
I'm developing a react app, using redux and electron. As I was programming an editor with INLINETEX support along with draft.js and the draft-js-mathjax-plugin, the necessity of saving my editor state showed up. So I'm converting the ContentState to…

António Pedro Fraga
- 199
- 1
- 12
2
votes
1 answer
Multiple draft-js-plugins editors on the same page don't work
I'm trying to use multiple rich text editors in a React form. I built the editor component using draft-js and also I integrated the inline toolbar from draft-js-plugins. Because this is a react-hook-form I wrapped the editor inside a Controller…

Valentin Vucea
- 119
- 2
- 11
2
votes
2 answers
Draft.js Mention Plugin is not working after rendering contentState to the editor
I am using mentions with the draft.js (like this @yourname) and sending to the database to save and fetching it to render on the web page but things are not working as expected.
On Saving to the database ->
const contentState =…

hardy
- 880
- 2
- 13
- 30
2
votes
1 answer
Draft-JS Mention Plugin - Change Mentions Object K/V
Switched our Rich Text Editor over to Draft-JS but am having an issue with the mentions plugin.
The mentions plugin expects an array of objects such as below.
const mentions = [
{
name: 'Matthew Russell',
link:…

Rykuno
- 458
- 3
- 14
2
votes
1 answer
How do I get current typing text in TextEditor and give auto complete like mention or hashtag in draftjs
How do I get current typing text in Text Editor and give auto complete like mention or hashtag in draftjs
here is simple
https://codesandbox.io/s/jovial-newton-hn18i
I tried autocomplete it enable on separate input field not in the Editor,
So is…

Shareque
- 129
- 1
- 9
2
votes
1 answer
draft-js-export-html not includes video when export
Currently, I'm using draft js editor, add plugin draft-js-video-plugin to insert video into editor and use draft-js-export-html to export html but the htmk result not includes video tag or anythings else.
Console log…

Hải Bùi
- 2,492
- 2
- 9
- 17
2
votes
2 answers
how do I initialize two Draftjs editor on same page?
I try to create two editor left and right but something went wrong when I initialize it the both editor malfunction,
One typing in first editor it automatically goes into second or vice versa.
Editor image
I included all the libraries and when try…

Shareque
- 129
- 1
- 9
2
votes
1 answer
DraftJS getBlocksAsArray() returns an array of an array in production but just an array in dev (and works)
I have the following code:
const sampleMarkup = "
Insert Text Here
";
const blocksFromHTML = convertFromHTML(sampleMarkup);
let builtContentState = ContentState.createFromBlockArray(blocksFromHTML.contentBlocks);
…
meds
- 21,699
- 37
- 163
- 314