From e062f3b9c0e3234b52dbf00ce41d0dc068005c0f Mon Sep 17 00:00:00 2001 From: hejiajun107 Date: Wed, 1 Nov 2023 00:20:18 +0800 Subject: [PATCH] fix: set value also needs to be used after ready to ensure that it takes effect (#19) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * setheight需要在ready后使用确保生效 * fix: 🐛 value也需要在ready后设置 --- src/UEditor/wwwroot/ueditor-blazor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/UEditor/wwwroot/ueditor-blazor.js b/src/UEditor/wwwroot/ueditor-blazor.js index 71c93fe..3ffe40a 100644 --- a/src/UEditor/wwwroot/ueditor-blazor.js +++ b/src/UEditor/wwwroot/ueditor-blazor.js @@ -9,6 +9,7 @@ window.UEditorBlazor = { domRef.UEditor = UE.getEditor(domRef.id, options); domRef.UEditor.ready(function () { editor.invokeMethodAsync('HandleRendered'); + domRef.UEditor.setContent(value || ""); domRef.UEditor.setHeight(options.height); }); domRef.UEditor.addListener('contentchange', function () {