From 1792b66ac3de2918bc929730b818886c2a3e1b9f Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Thu, 3 Nov 2011 12:09:39 +1100 Subject: [PATCH] Normalise text nodes when setting initial HTML. --- source/Editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Editor.js b/source/Editor.js index bcfe3c0..5ebbb30 100644 --- a/source/Editor.js +++ b/source/Editor.js @@ -1226,6 +1226,9 @@ document.addEventListener( 'DOMContentLoaded', function () { node.fixCursor(); } + // Normalise + frag.normalize(); + // Remove existing body children while ( child = body.lastChild ) { body.removeChild( child );