hubspot / draft-extend Goto Github PK
View Code? Open in Web Editor NEWBuild extensible Draft.js editors with configurable plugins and integrated serialization.
License: Apache License 2.0
Build extensible Draft.js editors with configurable plugins and integrated serialization.
License: Apache License 2.0
For a while, I was seeing this cryptic error message:
After a bit of digging, I found that I had an error in my textToEntity
middleware that was getting swallowed by the middleware handler, I assume here:
I've worked around this for now by wrapping the contents of my middleware with a try/catch and logging the error.
Examples and documentation still use the draft-js v0.9 API for creating entities (Entity.create
and Entity.get
).
We should migrate these examples to the v0.10 API as we move apps forward to the latest version!
As much as I prefer the factory function style of creating components, we should get rid of this dependency. Follow up to #23
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 (created by KeyCommandController(EditorWrapper))
in KeyCommandController(EditorWrapper) (created by Anonymous)
...
Supplying an `onEscape` 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).
Supplying an `onTab` 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).
Supplying an `onUpArrow` 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).
It looks like the default key bindings have changed and the convenience on*
handlers have been deprecated.
We'd like to be able to target the draft-extend-editor
in our styling, but are concerned about styling a class name that we didn't provide. We would like the draft extend editor to take in an editorClassName
prop which is applied to the draft-extend-editor
node, so that we can provide a className to style.
cc @bent0b0x
See LiveMessagesUI
pull #2847 on the HubSpot internal git for futher context.
With the current implementation, plugins don't receive an event if the same event is handle by the editor.
I'm trying to select a component with return
from a menu in an overlay but since I also handle return
in my editor, the overlay never gets the event. My current solution is to track when the overlay is active.
The change to let the plugins handle the event first seems straight forward but I wanted to make sure I'm not missing something before submitting a PR
Thank you
I'm seeing the following warnings using the example textToEntity
middleware:
DraftEntity.js:35 WARNING: DraftEntity.create will be deprecated soon!
Please use "contentState.createEntity" instead.
I'm seeing errors during installation npm install
. It's showing that 'BABEL_ENV' is not recognized when it starts 'build:commonjs' script.
npm-debug.log
Could you give an usage example of the overlay feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.