484
Views
14
Comments
Solved
Change the screen resolution: Cannot set the 'innerHTML' property to null
Question
CKEditor - When changing the screen resolution is generating this error, what should I do: It is not possible to set the 'innerHTML' property to null


2020-03-02 17-47-16
Isabella Torres
Solution
Sorted out


var expression = document.getElementById ($ parameters.ExpressionId);

 if (expression! == null) expression.innerHTML = $ parameters.Descricao;

2024-09-21 14-18-46
Tuan Alia Nabila Tuan Aziz

hi, in which part/client action u put this? 


Thanks

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Jessica,

Did you include any custom javascript code in your application that runs on the html onresize event?

Regards,

Daniel

2020-03-02 17-47-16
Isabella Torres
Good afternoon, I'm using CKEditor
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Isabella,

I am willing to help but there is not a lot of information you share, that I can work with, you need to give more details. Could you share a module in which the error can be reproduced?

Regards,

Daniel

2020-03-02 17-47-16
Isabella Torres




2019-09-24 18-41-25
Jorge Martins
 
MVP

Isabella,

It is possible that by the time your NarrativaItem's OnAfterFetch runs, your JavaScript1's ExpressionId input parameter no longer matches any element on the page... that is the nature of reactive applications, elements are added and removed from your screen dynamically.

What value are you passing as ExpressionId? And how is this related to CKEditor in the first place?

Cheers!

2020-03-02 17-47-16
Isabella Torres

2019-09-24 18-41-25
Jorge Martins
 
MVP

Seems like your JS node cannot find an element that has id attribute equal to birdnarrativadescricao.Id. What is this birdnarrativadescricao? I only see it mentioned in the ExpressionId input parameter of your JavaScript1 node...

2020-03-02 17-47-16
Isabella Torres


2019-09-24 18-41-25
Jorge Martins
 
MVP

So there's absolutely no relation between where you are using the CKEditor and the Block where you are executing the JavaScript?...

I suggest you debug your JavaScript (on the browser) to check what's the value of the birdnarrativadescricao.Id and whether there's an HTML element with that value as id.

2020-03-02 17-47-16
Isabella Torres
These are blocks that relate and fill the description field of the Narrative page.
Edit Narrative, is to change the description, Narrative Description is where is the description field of the Narrative that is shown in the Narrative Item, and the Narrative Item that is displayed on the page.
I will test your solution, I will debug here thanks.
2020-03-02 17-47-16
Isabella Torres

2020-03-02 17-47-16
Isabella Torres


Can you tell me what I should change in JavaScript to correct this error?
2020-03-02 17-47-16
Isabella Torres
Solution
Sorted out


var expression = document.getElementById ($ parameters.ExpressionId);

 if (expression! == null) expression.innerHTML = $ parameters.Descricao;

2024-09-21 14-18-46
Tuan Alia Nabila Tuan Aziz

hi, in which part/client action u put this? 


Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.