@gravity-ui/markdown-editor 13.5.0 → 13.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.d.ts +1 -0
- package/build/cjs/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.js +2 -2
- package/build/cjs/extensions/yfm/YfmHtmlBlock/index.d.ts +1 -0
- package/build/cjs/extensions/yfm/YfmHtmlBlock/index.js +1 -0
- package/build/cjs/version.js +1 -1
- package/build/esm/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.d.ts +1 -0
- package/build/esm/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.js +2 -2
- package/build/esm/extensions/yfm/YfmHtmlBlock/index.d.ts +1 -0
- package/build/esm/extensions/yfm/YfmHtmlBlock/index.js +1 -0
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import type { ExtensionNodeSpec } from '../../../../core';
|
|
|
2
2
|
export { yfmHtmlBlockNodeName } from './const';
|
|
3
3
|
export declare type YfmHtmlBlockSpecsOptions = {
|
|
4
4
|
nodeView?: ExtensionNodeSpec['view'];
|
|
5
|
+
sanitize?: (dirtyHtml: string) => string;
|
|
5
6
|
};
|
|
6
7
|
export declare const YfmHtmlBlockSpecs: import("../../../../core").ExtensionWithOptions<YfmHtmlBlockSpecsOptions> & {
|
|
7
8
|
readonly NodeName: "yfm_html_block";
|
|
@@ -6,9 +6,9 @@ const html_extension_1 = require("@diplodoc/html-extension");
|
|
|
6
6
|
const const_1 = require("./const");
|
|
7
7
|
var const_2 = require("./const");
|
|
8
8
|
Object.defineProperty(exports, "yfmHtmlBlockNodeName", { enumerable: true, get: function () { return const_2.yfmHtmlBlockNodeName; } });
|
|
9
|
-
const YfmHtmlBlockSpecsExtension = (builder, { nodeView }) => {
|
|
9
|
+
const YfmHtmlBlockSpecsExtension = (builder, { nodeView, sanitize }) => {
|
|
10
10
|
builder
|
|
11
|
-
.configureMd((md) => md.use((0, html_extension_1.transform)({ bundle: false }), {}))
|
|
11
|
+
.configureMd((md) => md.use((0, html_extension_1.transform)({ bundle: false, sanitize }), {}))
|
|
12
12
|
.addNode(const_1.YfmHtmlBlockConsts.NodeName, () => ({
|
|
13
13
|
fromMd: {
|
|
14
14
|
tokenSpec: {
|
|
@@ -3,6 +3,7 @@ import { Action, ExtensionAuto } from '../../../core';
|
|
|
3
3
|
import { YfmHtmlBlockAction } from './YfmHtmlBlockSpecs/const';
|
|
4
4
|
export declare type YfmHtmlBlockOptions = {
|
|
5
5
|
useConfig?: () => IHTMLIFrameElementConfig | undefined;
|
|
6
|
+
sanitize?: (dirtyHtml: string) => string;
|
|
6
7
|
};
|
|
7
8
|
export declare const YfmHtmlBlock: ExtensionAuto<YfmHtmlBlockOptions>;
|
|
8
9
|
declare global {
|
|
@@ -8,6 +8,7 @@ const actions_1 = require("./actions");
|
|
|
8
8
|
const YfmHtmlBlock = (builder, options) => {
|
|
9
9
|
builder.use(YfmHtmlBlockSpecs_1.YfmHtmlBlockSpecs, {
|
|
10
10
|
nodeView: YfmHtmlBlockNodeViewFactory(options),
|
|
11
|
+
sanitize: options.sanitize,
|
|
11
12
|
});
|
|
12
13
|
builder.addAction(const_1.YfmHtmlBlockAction, () => actions_1.addYfmHtmlBlock);
|
|
13
14
|
};
|
package/build/cjs/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
/** During build process, the current version will be injected here */
|
|
5
|
-
exports.VERSION = typeof '13.5.
|
|
5
|
+
exports.VERSION = typeof '13.5.1' !== 'undefined' ? '13.5.1' : 'unknown';
|
|
@@ -2,6 +2,7 @@ import type { ExtensionNodeSpec } from '../../../../core';
|
|
|
2
2
|
export { yfmHtmlBlockNodeName } from './const';
|
|
3
3
|
export declare type YfmHtmlBlockSpecsOptions = {
|
|
4
4
|
nodeView?: ExtensionNodeSpec['view'];
|
|
5
|
+
sanitize?: (dirtyHtml: string) => string;
|
|
5
6
|
};
|
|
6
7
|
export declare const YfmHtmlBlockSpecs: import("../../../../core").ExtensionWithOptions<YfmHtmlBlockSpecsOptions> & {
|
|
7
8
|
readonly NodeName: "yfm_html_block";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { transform } from '@diplodoc/html-extension';
|
|
3
3
|
import { YfmHtmlBlockConsts } from './const';
|
|
4
4
|
export { yfmHtmlBlockNodeName } from './const';
|
|
5
|
-
const YfmHtmlBlockSpecsExtension = (builder, { nodeView }) => {
|
|
5
|
+
const YfmHtmlBlockSpecsExtension = (builder, { nodeView, sanitize }) => {
|
|
6
6
|
builder
|
|
7
|
-
.configureMd((md) => md.use(transform({ bundle: false }), {}))
|
|
7
|
+
.configureMd((md) => md.use(transform({ bundle: false, sanitize }), {}))
|
|
8
8
|
.addNode(YfmHtmlBlockConsts.NodeName, () => ({
|
|
9
9
|
fromMd: {
|
|
10
10
|
tokenSpec: {
|
|
@@ -3,6 +3,7 @@ import { Action, ExtensionAuto } from '../../../core';
|
|
|
3
3
|
import { YfmHtmlBlockAction } from './YfmHtmlBlockSpecs/const';
|
|
4
4
|
export declare type YfmHtmlBlockOptions = {
|
|
5
5
|
useConfig?: () => IHTMLIFrameElementConfig | undefined;
|
|
6
|
+
sanitize?: (dirtyHtml: string) => string;
|
|
6
7
|
};
|
|
7
8
|
export declare const YfmHtmlBlock: ExtensionAuto<YfmHtmlBlockOptions>;
|
|
8
9
|
declare global {
|
|
@@ -5,6 +5,7 @@ import { addYfmHtmlBlock } from './actions';
|
|
|
5
5
|
export const YfmHtmlBlock = (builder, options) => {
|
|
6
6
|
builder.use(YfmHtmlBlockSpecs, {
|
|
7
7
|
nodeView: YfmHtmlBlockNodeViewFactory(options),
|
|
8
|
+
sanitize: options.sanitize,
|
|
8
9
|
});
|
|
9
10
|
builder.addAction(YfmHtmlBlockAction, () => addYfmHtmlBlock);
|
|
10
11
|
};
|
package/build/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** During build process, the current version will be injected here */
|
|
2
|
-
export const VERSION = typeof '13.5.
|
|
2
|
+
export const VERSION = typeof '13.5.1' !== 'undefined' ? '13.5.1' : 'unknown';
|