Skip to content

Commit

Permalink
Tests: Added manual tests for translating editors. See ckeditor/ckedi…
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Mar 27, 2018
1 parent 9a8f9f0 commit 86f54a1
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 0 deletions.
60 changes: 60 additions & 0 deletions tests/manual/ckeditor-amd-version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – classic editor build – RequireJS integration test</title>
<style>
body {
max-width: 800px;
margin: 20px auto;
}
</style>
</head>
<body>

<h1>CKEditor 5 – classic editor build – RequireJS integration test (see <a href="https://github.com/ckeditor/ckeditor5/issues/914">#914</a>)</h1>

<h2>In the default language</h2>

<div id="editor">
<h2>About CKEditor&nbsp;5</h2>

<p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
</div>

<h2>In German</h2>

<div id="editor-de">
<h2>About CKEditor&nbsp;5</h2>

<p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.js"></script>
<script>
require( [ '../../build/ckeditor.js' ], ( ClassicEditor ) => {
ClassicEditor.create( document.getElementById( 'editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
} );

require( [ '../../build/ckeditor.js', '../../build/translations/de.js' ], ( ClassicEditor ) => {
ClassicEditor
.create( document.getElementById( 'editor-de' ), {
language: 'de'
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
} );
</script>

</body>
</html>
57 changes: 57 additions & 0 deletions tests/manual/ckeditor-global-version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – classic editor build – global variable test</title>
<style>
body {
max-width: 800px;
margin: 20px auto;
}
</style>
</head>
<body>

<h1>CKEditor 5 – classic editor build – global variable test</h1>

<h2>In the default language</h2>

<div id="editor">
<h2>About CKEditor&nbsp;5</h2>

<p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
</div>

<h2>In German</h2>

<div id="editor-de">
<h2>About CKEditor&nbsp;5</h2>

<p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
</div>

<script src="../../build/ckeditor.js"></script>
<script src="../../build/translations/de.js"></script>
<script>
ClassicEditor.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );

ClassicEditor
.create( document.querySelector( '#editor-de' ), {
language: 'de'
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
</script>

</body>
</html>

0 comments on commit 86f54a1

Please sign in to comment.