Questions tagged [draft-js-plugins]

123 questions
0
votes
1 answer

Draft-js better way to save and retrive content form MySql

I use draft-js with some plugins as editor in a reactjs app. I'm looking for a good way to store data on db and retrieve that data. I think that the better solutions is to save data in two different format: the serialized raw json to eventually…
red
  • 1,529
  • 1
  • 12
  • 33
0
votes
1 answer

No compatible version found: draft-js-utils@^1.3.3

After recent update of draft-js-export-html 1.3.3 we are not able to compile the project as dependency is not found. We are getting below mentioned logs. npm ERR! notarget No compatible version found: draft-js-utils@^1.3.3 npm ERR! notarget Valid…
Hari Soni
  • 195
  • 3
  • 14
0
votes
1 answer

Set SelectionState for entity when clicked

I have a case where I can click on an entity, and then select new content to replace the entire entity. For example: Here is some text [special entity] and some more text ^ click anywhere inside the brackets After choosing…
thetallweeks
  • 6,875
  • 6
  • 25
  • 24
0
votes
0 answers

Mismatch in entityRanges with emoji as presiding text to mentions

i am using mentions plugin it works awesome as expected without emojis/unicode. My situations ex: " dude Suresh Chandrababu" is my text in editor. Suresh Chandrababu is mention. I need to extract the mention offset position, length and send to my…
Suresh
  • 1,199
  • 2
  • 12
  • 36
0
votes
1 answer

How to use strategy function Decorator in Draft.js?

I've been playing with the Decorators in Draft.js but when I could not build a custom one I am sending the text to an API which I will get a response with an array of incorrect words that typed in the editor So I am trying to build a Strategory…
Rami Salim
  • 182
  • 2
  • 11
0
votes
1 answer

Adding a horizontal rule button to React Draft Wysiwyg

I'm trying to add a custom button to React Draft Wysiwyg to insert a
tag to my content. Using the demos and documentation I've managed to get the custom button to insert text but not markup. onClick = () => { const { editorState, onChange } =…
Tim Barnett
  • 1,012
  • 5
  • 9
0
votes
1 answer

How to change order of ContentBlock render in draftjs?

Got an question about draft js. How i can change an order of ContentBlocks? Im trying to add an external link to content and render video inside of Editor. Creating current state: createEditorState(source) { if (!source) { return…
Ashhm
  • 15
  • 3
0
votes
1 answer

How can I render html on Draft editor instance?

I have a use case where I have to render an HTML template onto an editor. I am exploring draftjs for the same. I have the basic setup done and have draftjs editor rendering for simple text. But if I pass an HTML string to same Editor component I…
bluefalcon
  • 505
  • 1
  • 5
  • 21
0
votes
0 answers

Copying images in from anti-scraper websites. Google Docs handles it easily - anyone know how?

I've been playing around with making a draftjs plugin that lets the user paste in mixed text&image content from websites and have images auto-uploaded to the server. I've quickly come to the realization that it's not easy, simply because of how…
Cerzi
  • 768
  • 5
  • 19
0
votes
1 answer

Enable left click in edit mode for linkify plugin for draftjs

I was trying draft-js-linkify-plugin for creating a simple rich text editor. I have a requirement that link should be clickable while I am editing the content. Is there any way to do it?
sahil solanki
  • 507
  • 6
  • 20
0
votes
1 answer

Draft.js styles not working

I'm trying to use Draft.js with the Image plugin. Here are my problems. I manage to get it to work, but the styles aren't loaded and the editor takes the whole page and the buttons aren't styled. I load the styles from the provided CSS import…
aspiring_dev
  • 83
  • 4
  • 12
0
votes
1 answer

How to allow resizing when the mouse hovers on the bottom of the image?

I am using Draft.js plugin Resizeable. I am trying to allow resizing when the mouse hovers on the bottom (if possible, also include bottom right corner) of the image. In the document Usage section, it says: Hover with the mouse on the right side…
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
0
votes
1 answer

Why instanceof Map returns false?

I am using Draft.js plugin Mention. For editorState.content.entityMap.mention, I can successfully get value by mention.get('address') But why I check whether it is Map by console.log('mention', mention); console.log('mention instanceof Map',…
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
0
votes
1 answer

Importing Editor from draft-js-plugins-editor causes TypeErrors on empty project

I've created a new React project in Webstorm. I've installed draft-js and draft-js-plugins-editor, along with the plugins draft-js-hashtag-plugin and draft-js-mathjax-plugin (Using node). I've following their 'getting started' on their Github,…
haz
  • 2,034
  • 4
  • 28
  • 52
0
votes
1 answer

Custom block using blockRendererFn with DraftJS

Is it possible to render a custom block where some parts of it are editable and some are not? Here is an example of what I am trying to achieve. The ReadOnlyComponent component should be read only, while the WriteComponent contains data that can be…
Alberto Centelles
  • 1,215
  • 11
  • 24
1 2 3
8
9