Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] SetCurosorToEnd property for editor.SetValue() #4803

Open
2 tasks done
htcfreek opened this issue Jan 15, 2025 · 0 comments
Open
2 tasks done

[Feature Request] SetCurosorToEnd property for editor.SetValue() #4803

htcfreek opened this issue Jan 15, 2025 · 0 comments
Labels
feature-request Request for new features or functionality

Comments

@htcfreek
Copy link
Contributor

htcfreek commented Jan 15, 2025

Context

  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)

Description

Currently the api method editor.SetValue() set the cursor to column 1 in line 1 after inserting text.

But sometimes it is required to insert text, then set the cursor at the end of the inserted text and then scroll to this position if it is out of view. (For example when loading a predefined text that should support directly pasting data after it.)

I suggest to add a second optional (and default to false) parameter to editor.SetValue() that allows to set the cursor at the end of the "inserted" text.

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

@htcfreek htcfreek added the feature-request Request for new features or functionality label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

1 participant