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

Insert the Value in the Current Cursor Position Using ngx-monaco-editor-v2 #271

Open
Siva-Harish98 opened this issue Mar 21, 2024 · 0 comments

Comments

@Siva-Harish98
Copy link

Hi guys, I'm slightly stuck with a problem. I want to insert a value at the cursor position, but it's very difficult for me in ngx-monaco-editor-v2. I've searched a lot, but I haven't found any documentation regarding this in ngx-monaco-editor-v2.
Can you pls help me to find the cursor Position and How to Insert the value

HTML
<ngx-monaco-editor [options]="editorOptions" [(ngModel)]="code">

Ts file

import { Component } from '@angular/core';

@component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
editorOptions = {theme: 'vs-dark', language: 'javascript'};
code: string= 'function x() {\nconsole.log("Hello world!");\n}';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant