character.js 760 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. CKEDITOR.define( [ 'document/node' ], function( Node ) {
  7. /**
  8. * Data structure for character stored in the linear data.
  9. *
  10. * @class Character
  11. */
  12. class Character extends Node {
  13. /**
  14. * Creates character linear item.
  15. *
  16. * @param {String} character Described character.
  17. * @param {Iterable} attrs Iterable collection of {@link document.Attribute attributes}.
  18. * @constructor
  19. */
  20. constructor( character, attrs ) {
  21. super( attrs );
  22. /**
  23. * Described character.
  24. *
  25. * @readonly
  26. * @property {String} character
  27. */
  28. this.character = character;
  29. }
  30. }
  31. return Character;
  32. } );