Last active
July 14, 2021 15:17
-
-
Save bjoerntx/b27c7a0b073353232a54934167fc9898 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/editor" | |
@implements IAsyncDisposable | |
@inject IJSRuntime JS | |
<style> | |
#txDocumentEditorContainer { | |
width: 1100px; | |
height: 600px; | |
display: inline-block; | |
position: relative; | |
} | |
</style> | |
<div id="txDocumentEditorContainer" @ref="txDocumentEditorContainer"></div> | |
@code { | |
private ElementReference txDocumentEditorContainer; | |
protected override async Task OnAfterRenderAsync(bool firstRender) { | |
if (firstRender) { | |
await JS.InvokeVoidAsync("addEditorToElement", txDocumentEditorContainer); | |
} | |
} | |
public async ValueTask DisposeAsync() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment