icelab / draft-js-single-line-plugin Goto Github PK
View Code? Open in Web Editor NEWRestrict a draft-js editor to a single line of input.
License: MIT License
Restrict a draft-js editor to a single line of input.
License: MIT License
๐ I'm considering using this plugin for my editor, but looking at its dependencies I see it uses Immutable.js ^3.8.1
:
draft-js-single-line-plugin/package.json
Line 51 in 576afbb
This is incompatible with Draft.js itself, which requires ~3.7.4
(https://github.com/facebook/draft-js/blob/37dadd35d76768ae8109297afad6d498cfa3bd60/package.json#L37). The consequence of this mismatch is that now my JS bundle contains two copies of Immutable, which is quite a big dependency.
From what I can see in the plugin's code, Immutable.js is only used to interact with Draft.js via List
and Map
. This should work the same in v3.7.4 โ would it be possible to change the dependency requirement to match that of Draft.js?
When you are writing and you reach the end of the line a line break is generated.
How could a single line Input be simulated without displaying a scroll bar?
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.