@@ -1,3 +0,0 @@
-<div id="editor">
- <p>This is the editor!</p>
-</div>
@@ -0,0 +1,3 @@
+<div id="snippet-classic-editor">
+ <p>This is <a href="https://ckeditor5.github.io">CKEditor 5</a>.</p>
+</div>
@@ -9,7 +9,7 @@ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'
import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
-ClassicEditor.create( document.querySelector( '#editor' ), {
+ClassicEditor.create( document.querySelector( '#snippet-classic-editor' ), {
plugins: [ ArticlePreset ],
toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
image: {
+<div id="snippet-inline-editor">
@@ -0,0 +1,24 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals console, window, document */
+import InlineEditor from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor';
+import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
+InlineEditor.create( document.querySelector( '#snippet-inline-editor' ), {
+ plugins: [ ArticlePreset ],
+ toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
+ image: {
+ toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ]
+ }
+} )
+.then( editor => {
+ window.editor = editor;
+.catch( err => {
+ console.error( err.stack );
+} );
@@ -6,4 +6,4 @@ order: 10
Classic editor sample.
-{@snippet basic/integration1}
+{@snippet samples/classic-editor}
@@ -0,0 +1,9 @@
+---
+title: Inline editor sample
+category: samples-builds
+order: 10
+Inline editor sample.
+{@snippet samples/inline-editor}
@@ -38,12 +38,28 @@ function getTestOptions() {
// Documentation. -------------------------------------------------------------
gulp.task( 'docs', () => {
- if ( process.argv[ 3 ] == '--no-api' ) {
- return runUmberto();
+ const skipLiveSnippets = process.argv.includes( '--skip-snippets' );
+ const skipApi = process.argv.includes( '--skip-api' );
+ if ( skipApi ) {
+ const fs = require( 'fs' );
+ const apiJsonPath = './docs/api/output.json';
+ if ( fs.existsSync( apiJsonPath ) ) {
+ fs.unlinkSync( apiJsonPath );
+ return runUmberto( {
+ skipLiveSnippets
+ } );
}
return buildApiDocs()
- .then( runUmberto );
+ .then( () => {
} );
gulp.task( 'docs:api', buildApiDocs );
@@ -64,13 +80,14 @@ function buildApiDocs() {
-function runUmberto() {
+function runUmberto( options ) {
assertIsInstalled( 'umberto' );
const umberto = require( 'umberto' );
return umberto.buildSingleProject( {
configDir: 'docs',
- clean: true
+ clean: true,
+ skipLiveSnippets: options.skipLiveSnippets