{"id":20888013,"url":"https://github.com/canop/taliner.js","last_synced_at":"2026-02-13T08:04:49.975Z","repository":{"id":18393671,"uuid":"21574899","full_name":"Canop/taliner.js","owner":"Canop","description":"Is the caret on the first line of the textarea ? On the last line ?","archived":false,"fork":false,"pushed_at":"2019-09-19T11:40:20.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T11:19:23.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Canop.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T15:06:00.000Z","updated_at":"2022-04-19T10:08:37.000Z","dependencies_parsed_at":"2022-07-26T22:02:04.645Z","dependency_job_id":null,"html_url":"https://github.com/Canop/taliner.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Ftaliner.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Ftaliner.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Ftaliner.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Ftaliner.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Canop","download_url":"https://codeload.github.com/Canop/taliner.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243268796,"owners_count":20263925,"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":[],"created_at":"2024-11-18T08:23:47.958Z","updated_at":"2025-09-23T13:25:09.628Z","avatar_url":"https://github.com/Canop.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Why ?\n\nFind if the caret is on the first line or on the last line of a textarea isn't easy. More details on why it's hard in [this StackOverflow question](http://stackoverflow.com/q/24605280/263525).\n\nIf you need this precise information, then this plugin might be handy.\n\n**[Demonstration](http://dystroy.org/demos/taliner/demo.html)**\n\n\n# How to use it ?\n\n`$('#yourTextarea').taliner()` returns an object with three properties :\n\n- caretOnFirstLine : a boolean telling if the caret is on the first line of the textarea.\n- caretOnLastLine : a boolean too. Guess what it is.\n- linesNumber : the total number of lines of text of the textarea.\n\n# Does it really always work ?\n\nAlmost.\n\nIf a line ends with a space because of word wrapping and you click right to that line, you'll end to a position undistinguishable from the start of the following line.\n\nI don't see any fix for that right now. if you have one, please contribute.\n\n# Alternatives\n\nThere's a specification for a [CaretPosition](https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition) in the browser.\n\nBut it's only available on Firefox.\n\n# License\n\nPublic Domain. Use as you wish and at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Ftaliner.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanop%2Ftaliner.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Ftaliner.js/lists"}