HTML node deletes/does not save changes when editing large code

Description:
Hi, I’ve been having issues when trying to edit an HTML node in n8n.

  • If I paste HTML code (around 400 lines) inside the HTML node, the code disappears or does not get saved.

  • If I try to edit existing code inside the node, the changes are also lost after saving.

  • The only workaround I found was to create a new HTML node and paste the full code there. That way, the code remains, but editing later is still not reliable.

This behavior started recently — before, I could edit large HTML content without problems.

Not sure if the issue is related to the length of the HTML (≈400 lines) or something else.

Environment:

  • n8n version: 1.107.3

  • Deployment: Docker

  • Browsers tested: Chrome & Firefox (same issue)

Has anyone else experienced this? Any ideas or workarounds?

Thanks in advance :folded_hands:

I just pasted a 10000 lines json to HTML node, executed, saved, closed the flow, reopened the flow, executed again. The whole html stays where it was. Could you maybe illustrate what exactly you do to make it disappear?

Repro steps (HTML → Generate Content node):

  1. Add an HTML node (Generate Content).
  2. Open it, focus the code editor.
  3. Press Ctrl+A to select the default sample HTML.
  4. Press Ctrl+V to paste my HTML (~391 lines).
  5. Result: the editor keeps the original sample template — my paste does not replace it.

Notes:

  • If I paste the exact same 391-line HTML into a Code node, it pastes correctly and I can see my content there.
  • Issue only happens in the HTML (Generate Content) node.
  • I tried multiple times, including saving/executing; paste still doesn’t take.

What if you first delete the content of the field and only then paste?

I also tried that — literally deleted the whole content first and then pasted my HTML. The result is even worse: the node inserts nothing at all and stays empty.

So basically it doesn’t work in any of these cases:

  • Ctrl+A → Delete → Ctrl+V → nothing gets saved, node stays blank.

  • Ctrl+A → Ctrl+V directly → the sample HTML stays, my code is ignored.

  • Editing only specific fields (instead of replacing everything) → as soon as I move the cursor to another place, my changes disappear and the old content comes back.

In short: no matter if I replace everything, delete and paste, or just edit a few parts, the changes don’t persist.

I’d assume if you try to paste with mouse right click + paste, the result is the same?

yes, i already tried too

Well, you could try to do the same in incognito mode and in the different browser, just in attempt to narrow it down.

I’ve also tried in Opera, Chrome, and Firefox, same behavior. :sweat_smile:

Any errors in the dev console while you are pasting the new data?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.