diff --git a/CodeMirror6/CodeMirror6WrapperInternal.razor.cs b/CodeMirror6/CodeMirror6WrapperInternal.razor.cs index bfa6b0d..d5fe914 100644 --- a/CodeMirror6/CodeMirror6WrapperInternal.razor.cs +++ b/CodeMirror6/CodeMirror6WrapperInternal.razor.cs @@ -225,6 +225,11 @@ public partial class CodeMirror6WrapperInternal : ComponentBase, IAsyncDisposabl /// public CMCommandDispatcher? CommandDispatcher => CmJsInterop?.CommandDispatcher; + /// + /// Is the JS CodeMirror instance ready? + /// + public bool IsLoaded => CmJsInterop?.IsJSReady == true; + private string SetupId = null!; private string LoadingDivId => $"{SetupId}_Loading"; private string ContainerId => $"{SetupId}_Container"; @@ -248,7 +253,6 @@ public partial class CodeMirror6WrapperInternal : ComponentBase, IAsyncDisposabl private string MaxWidthStyle => FullScreen || (string.IsNullOrEmpty(MaxWidth) && string.IsNullOrEmpty(Width)) ? string.Empty : $"max-width: {MaxWidth ?? Width};"; private string MaxHeightStyle => FullScreen || (string.IsNullOrEmpty(MaxHeight) && string.IsNullOrEmpty(Height)) ? string.Empty : $"max-height: {MaxHeight ?? Height};"; private string EditorStyle => $"{WidthStyle} {HeightStyle} {MaxWidthStyle} {MaxHeightStyle}"; - /// /// JavaScript interop instance /// @@ -475,10 +479,6 @@ protected override async Task OnParametersSetAsync() /// /// protected override bool ShouldRender() => shouldRender; - /// - /// Is the JS CodeMirror instance ready? - /// - public bool IsLoaded => CmJsInterop?.IsJSReady == true; /// /// Dispose resources