Commit bd7f8231 authored by Piotrek Koszuliński's avatar Piotrek Koszuliński

Updated the sample too.

parent a55552ac
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CKEditor 5 – decoupled document build – development sample</title> <title>CKEditor 5 – document editor build – development sample</title>
<style> <style>
body { body {
max-width: 800px; max-width: 800px;
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</head> </head>
<body> <body>
<h1>CKEditor 5 – decoupled document build – development sample</h1> <h1>CKEditor 5 – document editor build – development sample</h1>
<h2>The toolbar</h2> <h2>The toolbar</h2>
<div class="toolbar-container"></div> <div class="toolbar-container"></div>
...@@ -51,18 +51,18 @@ ...@@ -51,18 +51,18 @@
<script src="../build/ckeditor.js"></script> <script src="../build/ckeditor.js"></script>
<script> <script>
const editorData = `<h2>Sample</h2> const editorData = `<h2>Sample</h2>
<p>This is an instance of the <a href="https://docs.ckeditor.com/ckeditor5/latest/builds/guides/overview.html#document-editor">decoupled document build</a>.</p> <p>This is an instance of the <a href="https://docs.ckeditor.com/ckeditor5/latest/builds/guides/overview.html#document-editor">document editor build</a>.</p>
<figure class="image"> <figure class="image">
<img src="../tests/manual/sample.jpg" alt="Autumn fields" /> <img src="../tests/manual/sample.jpg" alt="Autumn fields" />
</figure> </figure>
<p>You can use this sample to validate whether your <a href="https://docs.ckeditor.com/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>`; <p>You can use this sample to validate whether your <a href="https://docs.ckeditor.com/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>`;
DecoupledDocumentEditor.create( editorData, { DecoupledDocumentEditor.create( editorData )
toolbarContainer: document.querySelector( '.toolbar-container' ),
editableContainer: document.querySelector( '.editable-container' )
} )
.then( editor => { .then( editor => {
window.editor = editor; window.editor = editor;
document.querySelector( '.toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
document.querySelector( '.editable-container' ).appendChild( editor.ui.view.editable.element );
} ) } )
.catch( err => { .catch( err => {
console.error( err.stack ); console.error( err.stack );
......
# CKEditor 5 decoupled document build – standard version (CommonJS `require()`) # CKEditor 5 document editor build – standard version (CommonJS `require()`)
Just play with it. Just play with it.
......
# CKEditor 5 decoupled document build – standard version # CKEditor 5 document editor build – standard version
Just play with it. Just play with it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment