break.js 335 B

12345678910111213141516171819202122232425
  1. import { EmbedBlot } from 'parchment';
  2. class Break extends EmbedBlot {
  3. static value() {
  4. return undefined;
  5. }
  6. optimize() {
  7. if (this.prev || this.next) {
  8. this.remove();
  9. }
  10. }
  11. length() {
  12. return 0;
  13. }
  14. value() {
  15. return '';
  16. }
  17. }
  18. Break.blotName = 'break';
  19. Break.tagName = 'BR';
  20. export default Break;