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.

Draft.js is a framework for building rich text editors in React, powered by an immutable model and abstracting over cross-browser differences.

Draft.js makes it easy to build any type of rich text input, whether you're just looking to support a few inline text styles or building a complex text editor for composing long-form articles.

In Draft.js, everything is customizable – it provides the building blocks so that you have full control over the user interface.

You can learn more about Draft.js here.

746 questions
0
votes
2 answers

unable to import html by draft-js-import-html

I used draft-js-export-html npm and save html to my database as mentioned below. I followed this link and use npm draft-js-import to import html to editor content with draftjs. I can initialize content with html if my html doesn't contains any…
akshay
  • 1,151
  • 1
  • 19
  • 31
0
votes
1 answer

How to retrieve and display Draft-js raw object in a react component?

Although the author of Draft-js said that he "didn't want to release any conversion utilities" (https://github.com/facebook/draft-js/issues/62), I still want to ask that after saving raw object into database, how can we conveniently retrieve and…
Luke
  • 93
  • 1
  • 6
0
votes
1 answer

Draftjs: Query if entity of type "x" exists in content

I'm using draft-js in a chat client that I am building. I have created a custom entity that allows users to "@" mention other users. If a user is "@" mentioned, I want to send them a notification. Is there a way in draft-js to query the current…
nicksrandall
  • 3,008
  • 2
  • 12
  • 9
0
votes
1 answer

Is draft.js on bower?

**I would be really interested in installing draft.js through bower: does the library exist on this package manager? ** It can be installed through npm but this make it hard to install on a rails framework. thx
-1
votes
1 answer

Converting a class to a function

I need to convert the given class component into a functional one. I'm working with outputting an array of multiple Editors draft-js and I'm having some trouble outputting them. On the internet, I found a working class component with an array of…
-1
votes
1 answer

React JSON object is not parsing

I have field description which contains a JSON object and I want to parse it. When I console.log(description) it displays the object content and also displays the object on the page. {"blocks":[{"key":"1i9ik","text":"Issue…
user16463210
-1
votes
1 answer

How to prevent draft.js from removing blocks on Backspace

I'm currently developing a RichText Editor with Draft.JS and React.JS and I want to prevent Draft.JS from deleting inserted atomic blocks on backspace, but rather move the cursor into the textarea element of the atomic block. Is this possible and if…
K. Tim
  • 3
  • 1
-1
votes
1 answer

How to convert string in draft js

I have a string from API request like this. const test = **test**↵***nice***↵; The "test" should be bold and "nice" should be bold and italic. I am using this code in my component but it shows the *. this.setState({ editorState:…
B.V
  • 109
  • 2
  • 13
-1
votes
1 answer

Customize document link rendering from RichTextBlock

I'm working in modernize a old website and i saw that the use buttons for redering document's URLs. I saw that we can import documents from draftail but i'm not sure how can we modify document's rendering to show a button instead a link as…
SalahAdDin
  • 2,023
  • 25
  • 51
-2
votes
1 answer

how to trigger event when i type # or @ in textfeild in react/nextjs

there I am building a new project and wondering how can i implement this in react/nextjs. and i wanted show user selection or hashtag selction dialog around the textarea but didn't find any good article or github repo about it any one can help me…
1 2 3
49
50