diff --git a/customize.dist/ckeditor-contents.css b/customize.dist/ckeditor-contents.css index 80d2c3890..378d61793 100644 --- a/customize.dist/ckeditor-contents.css +++ b/customize.dist/ckeditor-contents.css @@ -24,10 +24,16 @@ body right: 0; } +/* Remove margin-top for the first element */ body > *:first-child { margin-top: 0; } +/* If the magic line is the first element, remove margin-top for the next one */ +body > .non-realtime:first-child + * { + margin-top: 0; +} + .cke_editable { font-size: 16px; diff --git a/www/pad/export.js b/www/pad/export.js index 2bc54a430..263593a54 100644 --- a/www/pad/export.js +++ b/www/pad/export.js @@ -38,7 +38,7 @@ define([ module.main = function (userDoc, cb) { var inner; - if (userDoc instanceof Element || userDoc instanceof HTMLElement) { + if (userDoc && userDoc.tagName) { inner = userDoc; } else { try {