serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
441 stars 99 forks source link

Unable to bind value to c# object. #55

Open CliffBDev opened 2 years ago

CliffBDev commented 2 years ago

Is there a way to data-bind the value to a string or a string property of an object? I have not seen any documentation on data binding at all.

codymullins commented 2 years ago

@QuietDesperationDev I didn't see it either. I accomplished it somewhat manually in Spacetime. Fairly untested but it seems to work from first glance.

JesperOlsen commented 11 months ago

It would appear that there is no value-bind. I created a @ref to the component and then used the GetValue method to received the edited text. <StandaloneCodeEditor @ref="editor" ConstructionOptions="ProvideEditorOptions" CssClass="codeeditor"/> and then when needed await editor.GetValue()