Questions tagged [draft-js-plugins]

123 questions
1
vote
0 answers

Draft.js Custom Button for Custom Block

I am trying to wrap my head around custom block components in draft.js and I am following this tutorial. The tutorial mentions a way to detect the input and go into a custom block mode, in this case on inputting [] when a block is empty, we go into…
divyenduz
  • 2,037
  • 19
  • 38
1
vote
1 answer

Draft JS - mention- plugins produce this: Warning: React does not recognize the isFocused prop on a DOM element

I'm facing a problem when it comes to involving the draft-js-mention-plugin, into my app. Please, have a look: "Warning: React does not recognize the isFocused prop on a DOM element. If you intentionally want it to appear in the DOM as a custom…
1
vote
1 answer

Failed to resize image vertically in Draft.js

I am using Draft.js plugin Resizeable. I am trying to resize the image with original length-to-width ratio. However, for the code below, when I use the mouse to resize by the bottom edge of the image, the cursor changed, but it failed to resize. It…
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
1
vote
1 answer

abstract draft-js into custom component that deals with just html I/O

I have this react component that has to abstract draft-js editor. My redux store will have this description field that must be a regular HTML string. The editor should be able to take a value HTML string and parse it into its own internal things…
enapupe
  • 15,691
  • 3
  • 29
  • 45
1
vote
2 answers

custom button in inline toolbar that calls custom function

I want to combine the inline toolbar with the example from draft.js to insert a link into the editor. Thanks to the draft.js plugin FAQ I am able to add a decorator to the draft-js-plugin editor which inserts a link on a button click. Now I want to…
waXve
  • 792
  • 2
  • 9
  • 30
1
vote
1 answer

Custom programmable widgets in Draft.js (plugin)

As an example of what I'd like to do, in Draft.js I'd like to allow the users to include a slideshow of images in the page that could change externally later on. So if there is a slideshow defined in my app, the user could select that slideshow to…
eltiare
  • 1,817
  • 1
  • 20
  • 28
1
vote
0 answers

How to remove mentions from an editorstate in draft js?

Been at this one for a LONG time and can't quite figure it out. I have two components, controlled by a parent component. There is a property called "selected". So, when a user clicks on a list, it will update the parent component's selected property…
corvid
  • 10,733
  • 11
  • 61
  • 130
0
votes
0 answers

DraftJS - Make first N character of the editor static

If there a way to make the first N characters of the Editor to be static. I tried using a decorator, but when you select all characters and press delete, it deletes the entire data.
Ankit Solanki
  • 670
  • 2
  • 9
  • 23
0
votes
0 answers

Adding Table Support to Draft-js Text Editor: Exploring the draft-js-table-plugin Library

In our project, we are using the draft-js text editor. I am currently attempting to add table support to the text editor. After trying to implement it myself and realizing that the task was too complex, I started exploring the use of an open-source…
0
votes
0 answers

i want to upload image in draft js editor. image completely uploaded in server but draft js can not store url in img block

I want to upload Image in draft js Editor. when i upload image in server then it successfully uploaded in server and get back imageurl. i want to save this url in src attribute in draft js but it is not work when i InsertImage…
0
votes
0 answers

How to change font size of selected text in draft.js

I am using draft-js-plugins. This library does not have to change the font or font size. I need that when a text is selected it changes its font and size to the one selected. As in google docs. To select the text I am using GetSelection properties: …
0
votes
0 answers

Is it possible to convert draft-js ContentState to an openxml document?

I'm looking at the React component draft-js, a rich content editor which creates a blob of text called "ContentState". I have a React 18 web application created using create-react-app. Is it possible to convert the ContentState created by the…
Tom Regan
  • 3,580
  • 4
  • 42
  • 71
0
votes
0 answers

How to set max-limit character when markup is applied - Draft js - react-draft-wysiwyg

This answer is only working if the editor has only text inside. max-length check is not working if markup is applied to the text like bold or italics. Can anyone please help me in this case. handleBeforeInput={val => { const textLength =…
0
votes
0 answers

draft-js convert to html to display on page

I'm looking for some help on how to convert a string of html like below to draftjs and convert back to html to display on a page as html without a rich text editor or WYSIWYG: const htmlString = `

hello world

  • hello
0
votes
0 answers

Can’t insert text after inserting image in edit mode draft.js

I first upload the image to s3 through my draft.js editor. The image is saved and everything working well. But when I open draft.js to edit the content, I can’t add some text. It seems that the part of adding text is despair if there is only image…
1 2 3
8 9