TypeError: Cannot read properties of null (reading 'getContent')

オープン
#83 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

bug status: escalated

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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tinymce/tinymce-blazor のほかの issue

tinymce/tinymce-blazor の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。