Browse Source

Appending editor to the container in data initialization manual test.

Szymon Kupś 7 years ago
parent
commit
1c73ed7e48

+ 7 - 0
packages/ckeditor5-editor-classic/tests/manual/classiceditor-data.html

@@ -3,9 +3,16 @@
 	<button id="initEditor">Init editor</button>
 </p>
 
+<div class="container"></div>
+
 <style>
 	body {
 		width: 10000px;
 		height: 10000px;
 	}
+
+	.container {
+		padding: 20px;
+		width: 500px;
+	}
 </style>

+ 3 - 1
packages/ckeditor5-editor-classic/tests/manual/classiceditor-data.js

@@ -18,6 +18,8 @@ const data = '<h2>Hello world!</h2><p>This is an editor instance.</p>';
 
 window.editors = [];
 
+const container = document.querySelector( '.container' );
+
 function initEditor() {
 	ClassicEditor
 		.create( data, {
@@ -26,7 +28,7 @@ function initEditor() {
 		} )
 		.then( editor => {
 			window.editors.push( editor );
-			document.body.appendChild( editor.element );
+			container.appendChild( editor.element );
 		} )
 		.catch( err => {
 			console.error( err.stack );