index.d.ts 998 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @description 段落行高 LineHeight
  3. * @author lichunlin
  4. *
  5. */
  6. import DropListMenu from '../menu-constructors/DropListMenu';
  7. import Editor from '../../editor/index';
  8. import { MenuActive } from '../menu-constructors/Menu';
  9. declare class LineHeight extends DropListMenu implements MenuActive {
  10. constructor(editor: Editor);
  11. /**
  12. * 执行命令
  13. * @param value value
  14. */
  15. command(value: string): void;
  16. /**
  17. * 遍历dom 获取祖父元素 直到contenteditable属性的div标签
  18. *
  19. */
  20. getDom(dom: HTMLElement): HTMLElement;
  21. /**
  22. * 执行 document.execCommand
  23. *
  24. */
  25. action(html_str: string, editor: Editor): void;
  26. /**
  27. * style 处理
  28. */
  29. styleProcessing(styleList: Array<string>): string;
  30. /**
  31. * 段落全选 比如:避免11变成111
  32. */
  33. setRange(startDom: Node, endDom: Node): void;
  34. /**
  35. * 尝试修改菜单激活状态
  36. */
  37. tryChangeActive(): void;
  38. }
  39. export default LineHeight;