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

LineNumber property #35

Open
albertoVieiraNeto opened this issue Mar 4, 2021 · 7 comments
Open

LineNumber property #35

albertoVieiraNeto opened this issue Mar 4, 2021 · 7 comments

Comments

@albertoVieiraNeto
Copy link

Hi, i'm trying to "bind" two editors together, this just means that the last "line number" of the first editor will become the first linenumber of the second editor, just to allow me to have a "read only" area on the "editor"

image
should this work? knowing that most of this will run as "interop"

image
a code very "similiar" will run on the "playground" without issues.

looking at the "create" function used in the JsInterop File, maybe that the function is being set as a "string".

am i doing something wrong?

@serdarciplak
Copy link
Owner

Currently, C# LineNumbers property is just a string, but it can be a function as well in JavaScript. I'll figure out a way to achieve the same thing in C# and publish a new version of BlazorMonaco this weekend.

@victorperez2911
Copy link

Hi @serdarciplak

Any news on this subject?

@serdarciplak
Copy link
Owner

Sorry. I couldn't find time for this yet. But I see this as a priority item for this repo. I'll solve it asap.

@serdarciplak
Copy link
Owner

I've added support for this in v2.1.0. Just set the LineNumbersLambda property of the construction options to a lambda and it will be called by the editor when needed.

@albertoVieiraNeto
Copy link
Author

albertoVieiraNeto commented Apr 15, 2021

Hi @serdarciplak and thanks for the attention.

I was testing, and when using the the new property LineNumbersLambda when the page loads the components, it throws the following:

image

image

My project runs on blazor-server-side, this functionality should be supported in this model?

@serdarciplak
Copy link
Owner

I haven't tested it on a server-side app. I'll check it out.

@serdarciplak serdarciplak reopened this Apr 16, 2021
@victorperez2911
Copy link

Hi @serdarciplak

Did you manage to take the test?

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

3 participants