TypeError: Cannot read properties of null (reading 'getContent')
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- html
- 领域
- frontend
调研方向
The issue points to updateTinyVal and dynamically rendered <Editor> components in a Blazor list. Start by tracing how the wrapper gets the TinyMCE instance when an item is added; reproduce the failure with AddItemToListOfItems and compare it with the working loop. Done means adding an item no longer triggers the null getContent error and existing editor binding still works.
由索引模型根据 Issue 内容生成。
描述
Specific code that throws the error:
const updateTinyVal = (id, val) => {
if (getTiny() && getTiny().get(id).getContent() !== val) {
getTiny().get(id).setContent(val);
}
};
Happens when i try to build it dynamically e.g.
This works:
foreach (var item in listOfItems)
{
<Editor @bind-Text="item.Text"/>
}
This doesnt:
<Button OnClick="AddItemToListOfItems"/>
foreach (var item in listOfItems)
{
<Editor @bind-Text="item.Text"/>
}
Not sure why.
- 主要语言
- HTML
- 星标
- 57
- 派生
- 17
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tinymce/tinymce-blazor 的其他 Issue
-
status: escalated
难度 1/5 1 小时以内 新手友好度 42/100
tinymce/tinymce-blazor#89 · 3 条评论 · 7 个 reaction ·
-
documentation GitHub status: escalated
难度 1/5 1 小时以内 新手友好度 35/100
tinymce/tinymce-blazor#70 · 4 条评论 · 1 个 reaction ·
-
GitHub
难度 3/5 1-2 天 新手友好度 35/100
tinymce/tinymce-blazor#59 · 8 条评论 ·
-
Debounce/delay未关闭enhancement GitHub
难度 4/5 3-5 天 新手友好度 28/100
tinymce/tinymce-blazor#58 · 2 条评论 ·
-
GitHub help wanted
难度 4/5 3-5 天 新手友好度 30/100
tinymce/tinymce-blazor#33 · 5 条评论 · 1 个 reaction ·
查看 tinymce/tinymce-blazor 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
vetro-protocol/vetro-monorepo#1321 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
Action playback and Record Again still open Convert to Frame with the old 1 to 300000 integer fields and no unit reading可能已有人在做 @Higgs32584 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
storytold/photocraft#20578 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bugfix
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复