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]Support replace the decoration with customized dom element #4722

Open
2 tasks done
cwangsmv opened this issue Oct 22, 2024 · 0 comments
Open
2 tasks done
Labels
feature-request Request for new features or functionality

Comments

@cwangsmv
Copy link

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

The current decoration API only allows to customized CSS for the ranged content.
It would be great to have a way to replace the decoration with customized Dom element, so what user sees is different from the real text content.
Current I am moving from CodeMirror to Monaco. For CodeMirror it allows to replace a range of text with customized dom using markText method like markText(start, end, { replacedWith: XXX}). replacedWith options could be a customized dom element.
I have not find a proper way to do that in Monaco.

Thanks!

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

@cwangsmv cwangsmv added the feature-request Request for new features or functionality label Oct 22, 2024
@cwangsmv cwangsmv changed the title [Feature Request]Support replace [Feature Request]Support replace the decoration with customized dom element Oct 22, 2024
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