Browse Source

Update config TS

pull/4746/head
Artur Arseniev 4 years ago
parent
commit
405392fc9b
  1. 6
      src/parser/config/config.ts

6
src/parser/config/config.ts

@ -40,7 +40,7 @@ export interface ParserConfig {
* Custom CSS parser. * Custom CSS parser.
* @see https://grapesjs.com/docs/guides/Custom-CSS-parser.html * @see https://grapesjs.com/docs/guides/Custom-CSS-parser.html
*/ */
parserCss?: (str: string, editor: EditorModule) => CssRuleProperties[]; parserCss?: (input: string, editor: EditorModule) => CssRuleProperties[];
/** /**
* Custom HTML parser. * Custom HTML parser.
@ -51,7 +51,7 @@ export interface ParserConfig {
* // Here the result will be XMLDocument, which extends Node. * // Here the result will be XMLDocument, which extends Node.
* parserHtml: (input, opts = {}) => (new DOMParser()).parseFromString(input, 'text/xml') * parserHtml: (input, opts = {}) => (new DOMParser()).parseFromString(input, 'text/xml')
*/ */
parserHtml?: any; // TODO parserHtml?: (input: string, options: HTMLParserOptions) => HTMLElement;
/** /**
* Default HTML parser options (used in `parserModule.parseHtml('<div...', options)`). * Default HTML parser options (used in `parserModule.parseHtml('<div...', options)`).
@ -62,7 +62,7 @@ export interface ParserConfig {
const config: ParserConfig = { const config: ParserConfig = {
textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol'], textTags: ['br', 'b', 'i', 'u', 'a', 'ul', 'ol'],
parserCss: undefined, parserCss: undefined,
parserHtml: null, parserHtml: undefined,
optionsHtml: { optionsHtml: {
htmlType: 'text/html', htmlType: 'text/html',
allowScripts: false, allowScripts: false,

Loading…
Cancel
Save