-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I have integrated TinyMCE editor 6 to .NET 7 blazor web assembly app according to official doc.
https://www.tiny.cloud/docs/tinymce/6/blazor-ref/
https://www.tiny.cloud/docs/tinymce/6/blazor-cloud/
Nuget packages:
<PackageReference Include="TinyMCE" Version="6.4.2" />
<PackageReference Include="TinyMCE.Blazor" Version="1.0.4" />I'm using TinyMCE Editor component also for 'read only' mode and I have issue with setting dynamically height of editor acording to content.
I'm using currently autoresize plugin, but it has some bug and it not always resize editor correctly. Sometimes I can see just first 3 lines of text. This bug happens totally randomly.
This is how it looks like if it will not resize correctly.

This is how it looks like if it will resize correctly.

<MudCard>
<MudCardContent>
<Editor
Value="@_html"
Conf="@_editorReadOnlyConfig"
Disable=true
ScriptSrc="/lib/tinymce/tinymce.min.js"
/>
</MudCardContent>
</MudCard> private readonly Dictionary<string, object> _editorReadOnlyConfig = new()
{
{ "plugins", new string[] { "autoresize" } }, // https://www.tiny.cloud/docs/plugins/opensource/autoresize/
{ "toolbar", false },
{ "menubar", false },
{ "statusbar", false },
};Any ideas how to deal with this?
Can i do the same thing just with css?
I'm using Editor component in readonly mode to view html because the blazor app will break all css if i would render the html as MarkupString.
Thank you!