{"id":13447864,"url":"https://github.com/abhas9/vanilla-caret-js","last_synced_at":"2025-03-22T01:31:27.380Z","repository":{"id":34809235,"uuid":"183877957","full_name":"abhas9/vanilla-caret-js","owner":"abhas9","description":"Set and get Caret position (contenteditable or TextArea) using Vanilla JavaScript","archived":false,"fork":false,"pushed_at":"2023-05-03T23:18:05.000Z","size":1082,"stargazers_count":38,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-14T01:35:29.798Z","etag":null,"topics":["caret","caretjs","contenteditable","dom","javascript","textarea"],"latest_commit_sha":null,"homepage":"https://abhas9.github.io/vanilla-caret-js/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhas9.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-28T08:14:29.000Z","updated_at":"2024-12-17T20:32:54.000Z","dependencies_parsed_at":"2024-06-18T19:45:41.183Z","dependency_job_id":"7e860c0c-b650-4e25-a80d-7b92c912df1e","html_url":"https://github.com/abhas9/vanilla-caret-js","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":"0.16666666666666663","last_synced_commit":"c423c10428a8f66d228adbbf83a09047d11bf2a2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhas9%2Fvanilla-caret-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhas9%2Fvanilla-caret-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhas9%2Fvanilla-caret-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhas9%2Fvanilla-caret-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhas9","download_url":"https://codeload.github.com/abhas9/vanilla-caret-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893457,"owners_count":20527597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caret","caretjs","contenteditable","dom","javascript","textarea"],"created_at":"2024-07-31T05:01:28.904Z","updated_at":"2025-03-22T01:31:26.914Z","avatar_url":"https://github.com/abhas9.png","language":"JavaScript","funding_links":["https://www.paypal.me/abhas9"],"categories":["JavaScript"],"sub_categories":[],"readme":"Set and get Caret position (contenteditable or TextArea) using Vanilla JavaScript\n====================\n\n[![NPM version][npm-version-image]][npm-url]\n[![NPM size][npm-size-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Donate][donate-image]][paypal-link]\n[![MIT License][license-image]][license-url]\n\n# Demo\n[![Demo](https://media.giphy.com/media/fndxOJjHJMvZqWEJBT/giphy.gif)](http://abhas9.github.io/vanilla-caret-js)\n\n\n# Setup\n```shell\n$ npm i vanilla-caret-js\nconst VanillaCaret = require('vanilla-caret-js');\n```\nOR\n```javascript\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/vanilla-caret-js@1.1.0/dist/VanillaCaret.min.js\"\u003e\u003c/script\u003e\n```\n# Example Usage\n\n```javascript\nvar caret = new VanillaCaret(document.getElementById('root')); // Initialize\ncaret.setPos(4); // Set\ndocument.getElementById('currentPosition').value = caret.getPos(); // Get\n```\n\n# Development\n\nOnce you've downloaded the files in this repo please run the following command in your terminal from the project folder (it may require `sudo`):\n\n```shell\n$ npm install\n```\n\n## Available tasks\n\n### Build and test\n```shell\n$ node make # or also `$ npm run default`\n```\n\n### Convert the ES6 code into valid ES5 combining all the modules into one single file\n```shell\n$ node make build # or also `$ npm run build`\n```\n\n### Start a nodejs static server\n```shell\n$ node make serve # or also `$ npm run serve`\n```\n\n[license-url]: LICENSE\n[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square\n\n[paypal-link]:https://www.paypal.me/abhas9\n[donate-image]:https://img.shields.io/badge/donate-%E2%9D%A4-brightgreen.svg?style=flat-square\n\n[npm-url]: https://www.npmjs.com/package/vanilla-caret-js\n[npm-version-image]: http://img.shields.io/npm/v/vanilla-caret-js.svg?style=flat-square\n[npm-size-image]: https://img.shields.io/bundlephobia/min/vanilla-caret-js.svg?style=flat-square\n\n[travis-url]:https://travis-ci.org/abhas9/vanilla-caret-js\n[travis-image]: https://api.travis-ci.org/abhas9/vanilla-caret-js.svg?branch=master\u0026style=flat-square\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhas9%2Fvanilla-caret-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhas9%2Fvanilla-caret-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhas9%2Fvanilla-caret-js/lists"}