index.d.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * @description 编辑器配置
  3. * @author wangfupeng
  4. */
  5. import { EmotionsType, FontSizeConfType, IndentationType, tooltipPositionType, FontStyleType } from './menus';
  6. import { UploadImageHooksType } from './image';
  7. import langConfig from './lang';
  8. import { UploadVideoHooksType } from './video';
  9. export declare type DicType = {
  10. [key: string]: string;
  11. };
  12. export declare type ConfigType = {
  13. height: number;
  14. languageType: string[];
  15. languageTab: string;
  16. menus: string[];
  17. excludeMenus: string[];
  18. fontNames: FontStyleType;
  19. lineHeights: string[];
  20. showMenuTooltips: boolean;
  21. indentation: IndentationType;
  22. fontSizes: FontSizeConfType;
  23. colors: string[];
  24. emotions: EmotionsType[];
  25. zIndex: number;
  26. onchange: Function | null;
  27. onfocus: Function;
  28. onblur: Function;
  29. onchangeTimeout: number;
  30. pasteFilterStyle: boolean;
  31. pasteIgnoreImg: boolean;
  32. pasteTextHandle: Function;
  33. styleWithCSS: boolean;
  34. linkImgCallback: Function;
  35. onSelectionChange: Function;
  36. placeholder: string;
  37. zIndexFullScreen: number;
  38. showFullScreen: boolean;
  39. showLinkImg: boolean;
  40. showLinkImgAlt: boolean;
  41. showLinkImgHref: boolean;
  42. uploadImgAccept: string[];
  43. uploadImgServer: string;
  44. uploadImgShowBase64: boolean;
  45. uploadImgMaxSize: number;
  46. uploadImgMaxLength: number;
  47. uploadFileName: string;
  48. uploadImgParams: DicType;
  49. uploadImgParamsWithUrl: boolean;
  50. uploadImgHeaders: DicType;
  51. uploadImgHooks: UploadImageHooksType;
  52. uploadImgTimeout: number;
  53. withCredentials: boolean;
  54. customUploadImg: Function | null;
  55. uploadImgFromMedia: Function | null;
  56. customAlert: Function;
  57. onCatalogChange: Function | null;
  58. lang: string;
  59. languages: typeof langConfig;
  60. linkCheck: Function;
  61. linkImgCheck: Function;
  62. compatibleMode: () => boolean;
  63. historyMaxSize: number;
  64. focus: boolean;
  65. onlineVideoCheck: Function;
  66. onlineVideoCallback: Function;
  67. showLinkVideo: Boolean;
  68. uploadVideoAccept: string[];
  69. uploadVideoServer: string;
  70. uploadVideoMaxSize: number;
  71. uploadVideoName: string;
  72. uploadVideoParams: DicType;
  73. uploadVideoParamsWithUrl: boolean;
  74. uploadVideoHeaders: DicType;
  75. uploadVideoHooks: UploadVideoHooksType;
  76. uploadVideoTimeout: number;
  77. withVideoCredentials: boolean;
  78. customUploadVideo: Function | null;
  79. customInsertVideo: Function | null;
  80. menuTooltipPosition: tooltipPositionType;
  81. };
  82. export declare type Resource = {
  83. [language: string]: ResourceLanguage;
  84. };
  85. export declare type ResourceLanguage = {
  86. [namespace: string]: ResourceKey;
  87. };
  88. export declare type ResourceKey = string | {
  89. [key: string]: any;
  90. };
  91. declare const defaultConfig: any;
  92. export default defaultConfig;