The Wayback Machine - https://web.archive.org/web/20200714061023/https://github.com/topics/draft-js
Skip to content
#

draft-js

Here are 178 public repositories matching this topic...

jacobedawson
jacobedawson commented Feb 16, 2020

Not a bug per se, but a clarification seeing that the docs aren't very up-to-date. If you need to set focus on the editor on render (e.g. on first page load), with functional components you can do it like this:

import React, { useRef, useEffect } from "react"
// other stuff

const editorReference = useRef();
useEffect(() => {
  editorReference.current.focusEditor();
}, [editorReferen
gauravsoti1
gauravsoti1 commented Apr 29, 2020

Use-case/Problem

Feature

Currently macros are visible like this inside the text key of block in my content state: @gauravsobti
I want it to show like @{{mention.employee.2342.name}} according to the data present in my entity map, so that when the user name changes, I can go ahead and change this. How do I go about and do this?

ackvf
ackvf commented Jan 21, 2020

Add to UserComponent's rule's documentation when is each rule triggered. Meaning, when and how often is each callback called.
https://craft.js.org/r/docs/api/user-component

for example: (note, I don't know if my assumptions are correct)

rules?

  • canDrag(currentNode: Node, helpers: NodeHelpers) => boolean
    Specifies if a component can be dragged. Applicable only to components whos

A multilingual react rich-text editor component includes media support such as texts, images, videos, audios, links etc. Development based on Draft-Js and Ant-design, good support html, markdown, draft-raw mode. 一款基于 draft-Js 和 ant-design 实现的 react 富文本编辑器组件,支持文本、图片、视频、音频、链接等元素插入,同时支持HTML、markdown、draft Raw格式。
  • Updated Jun 6, 2020
  • JavaScript
gmcnaughton
gmcnaughton commented Oct 14, 2019

After upgrading to draft-js 0.11.1, the following deprecation warnings appear in the console:

Supplying an `onDownArrow` prop to `DraftEditor` has been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/RG31RJ). 
    in DraftEditor (created by EditorWrapper)
    in EditorWrapper (create
draftjs-filters
thibaudcolas
thibaudcolas commented Sep 30, 2018

The public API is typed with Flow, but that's only useful for projects using Flow. For everyone else, it would be cool if the Flow types could be used to create JSDoc annotations. For example, VSCode will pick these up when autocompleting code ("Intellisense").

I'm not aware of any tool that does this, so the first step would be to find some and try them out.

Improve this page

Add a description, image, and links to the draft-js topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the draft-js topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.