Parcourir la source

Extrat snippet build to separate file. Prevent of ckeditor-duplicated-modules error.

Mateusz Samsel il y a 6 ans
Parent
commit
c01401f9f7

+ 0 - 0
packages/ckeditor5-link/docs/_snippets/features/build-link-source.html


+ 12 - 0
packages/ckeditor5-link/docs/_snippets/features/build-link-source.js

@@ -0,0 +1,12 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* globals window */
+
+import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
+import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
+
+window.ClassicEditor = ClassicEditor;
+window.CS_CONFIG = CS_CONFIG;

+ 1 - 4
packages/ckeditor5-link/docs/_snippets/features/link.js

@@ -3,10 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals console, window, document */
-
-import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
-import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
+/* globals console, window, document, ClassicEditor, CS_CONFIG */
 
 ClassicEditor
 	.create( document.querySelector( '#snippet-link' ), {

+ 1 - 4
packages/ckeditor5-link/docs/_snippets/features/linkdecorators.js

@@ -3,10 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals console, window, document, Worker, setTimeout */
-
-import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
-import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
+/* globals console, window, document, Worker, setTimeout, ClassicEditor, CS_CONFIG */
 
 ClassicEditor
 	.create( document.querySelector( '#snippet-link-decorators' ), {

+ 2 - 0
packages/ckeditor5-link/docs/features/link.md

@@ -3,6 +3,8 @@ title: Link
 category: features
 ---
 
+{@snippet features/build-link-source}
+
 The {@link module:link/link~Link} feature brings support for link editing to the editor. It allows for inserting hyperlinks into the edited content and offers the UI to create and edit them.
 
 ## Demo