Add JS dependency manager

Added LoadJS(https://github.com/muicss/loadjs) and migrated Quill interop to use LoadJS.
This commit is contained in:
Jim Spillane
2020-06-10 21:09:10 -04:00
parent 2ceeb25d0e
commit 5124dea72c
8 changed files with 58 additions and 22 deletions

View File

@ -13,7 +13,7 @@ namespace Oqtane.Modules.Controls
_jsRuntime = jsRuntime;
}
public Task CreateEditor(
public async Task CreateEditor(
ElementReference quillElement,
ElementReference toolbar,
bool readOnly,
@ -23,15 +23,14 @@ namespace Oqtane.Modules.Controls
{
try
{
_jsRuntime.InvokeAsync<object>(
await _jsRuntime.InvokeAsync<object>(
"Oqtane.RichTextEditor.createQuill",
quillElement, toolbar, readOnly,
placeholder, theme, debugLevel);
return Task.CompletedTask;
quillElement, toolbar, readOnly, placeholder, theme, debugLevel);
return;
}
catch
{
return Task.CompletedTask;
// handle exception
}
}