jakiestfu / jakiestfu/Medium.js

What methods are available to control the Cursor / Caret?

Open
#175 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.4k
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Hi!
Could you clarify for me what methods are actually available to control the caret or cursor position?

For instance, I thought i could use medium.cursor.moveCursorToEnd() but that throws errors.

My personal needs are to be able to place the caret at the very beginning or at the very end of the editable zone, after an ajax update of the html content.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the public cursor API, especially medium.cursor.moveCursorToEnd(), and compare it with caret behavior after an AJAX HTML update. Done when the available methods and a supported way to place the caret at the beginning or end of the editable zone are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.