8
0

htmlembed.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /**
  6. * @module html-embed/htmlembed
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import HtmlEmbedEditing from './htmlembedediting';
  10. import HtmlEmbedUI from './htmlembedui';
  11. /**
  12. * The HTML embed feature.
  13. *
  14. * It allows inserting HTML snippets directly to the editor.
  15. *
  16. * For a detailed overview, check the {@glink features/html-embed HTML embed feature} documentation.
  17. *
  18. * @extends module:core/plugin~Plugin
  19. */
  20. export default class HtmlEmbed extends Plugin {
  21. /**
  22. * @inheritDoc
  23. */
  24. static get requires() {
  25. return [ HtmlEmbedEditing, HtmlEmbedUI ];
  26. }
  27. /**
  28. * @inheritDoc
  29. */
  30. static get pluginName() {
  31. return 'HtmlEmbed';
  32. }
  33. }
  34. /**
  35. * The configuration of the html embed feature.
  36. *
  37. * ClassicEditor
  38. * .create( editorElement, {
  39. * htmlEmbed: ... // Html embed feature options.
  40. * } )
  41. * .then( ... )
  42. * .catch( ... );
  43. *
  44. * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
  45. *
  46. * @interface HtmlEmbedConfig
  47. */
  48. /**
  49. * @member {Boolean} [module:html-embed/htmlembed~HtmlEmbedConfig#previewsInData=false]
  50. */
  51. /**
  52. * @member {Function} [module:html-embed/htmlembed~HtmlEmbedConfig#sanitizeHtml]
  53. */