articlepluginset.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // /**
  2. // * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. // * For licensing, see LICENSE.md.
  4. // */
  5. //
  6. // /* global document */
  7. //
  8. // import ArticlePluginSet from '../_utils/articlepluginset';
  9. // import ClassicTestEditor from '../_utils/classictesteditor';
  10. //
  11. // import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
  12. // import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  13. // import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
  14. // import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
  15. // import Heading from '@ckeditor/ckeditor5-heading/src/heading';
  16. // import Image from '@ckeditor/ckeditor5-image/src/image';
  17. // import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
  18. // import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
  19. // import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar';
  20. // import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
  21. // import Link from '@ckeditor/ckeditor5-link/src/link';
  22. // import List from '@ckeditor/ckeditor5-list/src/list';
  23. //
  24. // import normalizeHtml from '@ckeditor/ckeditor5-utils/tests/_utils/normalizehtml';
  25. //
  26. // describe( 'ArticlePluginSet', () => {
  27. // let editor, editorElement;
  28. //
  29. // beforeEach( () => {
  30. // editorElement = document.createElement( 'div' );
  31. // document.body.appendChild( editorElement );
  32. //
  33. // return ClassicTestEditor.create( editorElement, { plugins: [ ArticlePluginSet ] } )
  34. // .then( newEditor => {
  35. // editor = newEditor;
  36. // } );
  37. // } );
  38. //
  39. // afterEach( () => {
  40. // editor.destroy();
  41. //
  42. // editorElement.remove();
  43. // } );
  44. //
  45. // it( 'should be loaded', () => {
  46. // expect( editor.plugins.get( ArticlePluginSet ) ).to.be.instanceOf( ArticlePluginSet );
  47. // } );
  48. //
  49. // it( 'should load all its dependencies', () => {
  50. // expect( editor.plugins.get( Essentials ) ).to.be.instanceOf( Essentials );
  51. //
  52. // expect( editor.plugins.get( Paragraph ) ).to.be.instanceOf( Paragraph );
  53. // expect( editor.plugins.get( Autoformat ) ).to.be.instanceOf( Autoformat );
  54. // expect( editor.plugins.get( Bold ) ).to.be.instanceOf( Bold );
  55. // expect( editor.plugins.get( Heading ) ).to.be.instanceOf( Heading );
  56. // expect( editor.plugins.get( Image ) ).to.be.instanceOf( Image );
  57. // expect( editor.plugins.get( ImageCaption ) ).to.be.instanceOf( ImageCaption );
  58. // expect( editor.plugins.get( ImageStyle ) ).to.be.instanceOf( ImageStyle );
  59. // expect( editor.plugins.get( ImageToolbar ) ).to.be.instanceOf( ImageToolbar );
  60. // expect( editor.plugins.get( Italic ) ).to.be.instanceOf( Italic );
  61. // expect( editor.plugins.get( Link ) ).to.be.instanceOf( Link );
  62. // expect( editor.plugins.get( List ) ).to.be.instanceOf( List );
  63. // } );
  64. //
  65. // it( 'loads data', () => {
  66. // const data =
  67. // '<h2>Heading 1</h2>' +
  68. // '<p>Paragraph</p>' +
  69. // '<p><strong>Bold</strong> <i>Italic</i> <a href="foo">Link</a></p>' +
  70. // '<ul>' +
  71. // '<li>UL List item 1</li>' +
  72. // '<li>UL List item 2</li>' +
  73. // '</ul>' +
  74. // '<ol>' +
  75. // '<li>OL List item 1</li>' +
  76. // '<li>OL List item 2</li>' +
  77. // '</ol>' +
  78. // '<figure class="image image-style-side">' +
  79. // '<img alt="bar" src="foo">' +
  80. // '<figcaption>Caption</figcaption>' +
  81. // '</figure>' +
  82. // '<blockquote>' +
  83. // '<p>Quote</p>' +
  84. // '<ul><li>Quoted UL List item 1</li></ul>' +
  85. // '</blockquote>';
  86. //
  87. // // Can't use data twice due to https://github.com/ckeditor/ckeditor5-utils/issues/128.
  88. // const expectedOutput =
  89. // '<h2>Heading 1</h2>' +
  90. // '<p>Paragraph</p>' +
  91. // '<p><strong>Bold</strong> <i>Italic</i> <a href="foo">Link</a></p>' +
  92. // '<ul>' +
  93. // '<li>UL List item 1</li>' +
  94. // '<li>UL List item 2</li>' +
  95. // '</ul>' +
  96. // '<ol>' +
  97. // '<li>OL List item 1</li>' +
  98. // '<li>OL List item 2</li>' +
  99. // '</ol>' +
  100. // '<figure class="image image-style-side">' +
  101. // '<img alt="bar" src="foo"></img>' +
  102. // '<figcaption>Caption</figcaption>' +
  103. // '</figure>' +
  104. // '<blockquote>' +
  105. // '<p>Quote</p>' +
  106. // '<ul><li>Quoted UL List item 1</li></ul>' +
  107. // '</blockquote>';
  108. //
  109. // editor.setData( data );
  110. //
  111. // expect( normalizeHtml( editor.getData() ) ).to.equal( expectedOutput );
  112. // } );
  113. // } );