8
0

dataprocessor.js 807 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /**
  6. * DataProcessor interface. It should be implemented by actual DataProcessors.
  7. * Each data processor implements a certain format of the data. E.g. `MarkdownDataProcessor` will convert the data
  8. * (Markdown string) to a DocumentFragment and back.
  9. *
  10. * @interface engine.dataProcessor.DataProcessor
  11. */
  12. /**
  13. * Converts a DocumentFragment to data.
  14. *
  15. * @method engine.dataProcessor.DataProcessor#toData
  16. * @param {DocumentFragment} fragment DocumentFragment to be processed.
  17. * @returns {*}
  18. */
  19. /**
  20. * Converts data to a DocumentFragment.
  21. *
  22. * @method engine.dataProcessor.DataProcessor#toDom
  23. * @param {*} data Data to be processed.
  24. * @returns {DocumentFragment}
  25. */