acdvorak / jquery.caret Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to manipulate the caret position and selection range of input and textarea elements
License: Other
jQuery plugin to manipulate the caret position and selection range of input and textarea elements
License: Other
$('#e_con_name').caret(); return an Object and not a number . Let me know where I'm wrong. Thanks.
Once a textarea's value is modified programmatically, the undo-redo history is lost for the textarea and Ctrl
+z
doesn't work anymore.
There seems to be a solution to this: http://stackoverflow.com/a/13597044/767685. This solution worked in my Chrome 38, but I haven't tested it across browsers.
It would be really useful to be able to get the caret's position in a content-editable div that includes the length of the div's elements such as
and <br>
.
I would be happy to implement this feature. Does anybody have an opinion on whether this would be an appropriate addition to jquery.caret?
dist folder should only contain last version, without version number suffix.
Package manager are here to handle the version we install & configuration / import file link to dist/lib_name.js. Having to handle version number everywhere is painfull.
It ignores any characters before the current line- it doesn't work with multiple lines.
Everything is working normally and perfectly when the contenteditable div contains only text.
When I have tags inside, it fails... It only takes the first text node inside the contenteditable div... It supposes to calculate all the nodes (img, span, etc) inside the contenteditable text.
The image below shows contenteditable div containing images (emojis)...
When I am checking the caret position when the div contains the image element, it calculates it perfectly, with no errors, the problem is when setting the caret position.
Checking the caret position: console.log( $('#cmb-text').caret()
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.