Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active July 14, 2021 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/b27c7a0b073353232a54934167fc9898 to your computer and use it in GitHub Desktop.
Save bjoerntx/b27c7a0b073353232a54934167fc9898 to your computer and use it in GitHub Desktop.
@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