You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I pretty much copied your "Basic Example" of the TextEditor into my component.
However, when I try to fetch the Text from the Editor in "OnAfterRenderAsync" it always throws following error:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Unable to get property 'getText' of undefined or null reference TypeError: Unable to get property 'getText' of undefined or null reference at window.QuillFunctions.getQuillText
which seems pretty weird to me. I checked, if you initialized your Editor somewhere, but could not find anything. I am using Blazor WASM.
Here´s my code:
`
<Blazored.TextEditor.BlazoredTextEditor @ref="DescriptionEditor" >
[Parameter]
public ExtendedModel Model { get; set; }
BlazoredTextEditor DescriptionEditor;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
Console.WriteLine(await DescriptionEditor.GetText());
}
`
(Something weird happened to the formatting. Sorry for that...)
The text was updated successfully, but these errors were encountered:
Sahara150
changed the title
Unhandled exception rendering component: Unable to get property 'getText' of undefined or null reference
Can´t reference Editor in OnAfterRender or OnParametersSet
Jan 20, 2021
So I checked the same stuff with your example and it also threw the error.
It makes sense to me, that you cannot reference it in the OnInitialized-method, since the editor is not rendered there, yet.
However above methods are called after rendering. Shouldn´t it work there?
Hey, I pretty much copied your "Basic Example" of the TextEditor into my component.
However, when I try to fetch the Text from the Editor in "OnAfterRenderAsync" it always throws following error:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Unable to get property 'getText' of undefined or null reference TypeError: Unable to get property 'getText' of undefined or null reference at window.QuillFunctions.getQuillText
which seems pretty weird to me. I checked, if you initialized your Editor somewhere, but could not find anything. I am using Blazor WASM.
Here´s my code:
`
<Blazored.TextEditor.BlazoredTextEditor @ref="DescriptionEditor" >
//The content you had
@Model.Description
</Blazored.TextEditor.BlazoredTextEditor>
@code {
`
(Something weird happened to the formatting. Sorry for that...)
The text was updated successfully, but these errors were encountered: