@ckeditor/ckeditor5-markdown-gfm 48.2.0 → 48.3.0-alpha.0

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.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import type { Markdown, PasteFromMarkdownExperimental } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface PluginsMap {
8
- [Markdown.pluginName]: Markdown;
9
- [PasteFromMarkdownExperimental.pluginName]: PasteFromMarkdownExperimental;
10
- }
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { Markdown, PasteFromMarkdownExperimental } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface PluginsMap {
8
+ [Markdown.pluginName]: Markdown;
9
+ [PasteFromMarkdownExperimental.pluginName]: PasteFromMarkdownExperimental;
10
+ }
11
11
  }
@@ -1,70 +1,70 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module markdown-gfm/gfmdataprocessor
7
- */
8
- import { type DataProcessor, type ViewDocument, type ViewDocumentFragment, type MatcherPattern } from '@ckeditor/ckeditor5-engine';
6
+ * @module markdown-gfm/gfmdataprocessor
7
+ */
8
+ import { type DataProcessor, type ViewDocument, type ViewDocumentFragment, type MatcherPattern } from "@ckeditor/ckeditor5-engine";
9
9
  /**
10
- * This data processor implementation uses GitHub Flavored Markdown as input/output data.
11
- *
12
- * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.
13
- */
10
+ * This data processor implementation uses GitHub Flavored Markdown as input/output data.
11
+ *
12
+ * See the {@glink features/markdown Markdown output} guide to learn more on how to enable it.
13
+ */
14
14
  export declare class MarkdownGfmDataProcessor implements DataProcessor {
15
- /**
16
- * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.
17
- */
18
- private _htmlDP;
19
- /**
20
- * Helper for converting Markdown to HTML.
21
- */
22
- private _markdown2html;
23
- /**
24
- * Helper for converting HTML to Markdown.
25
- */
26
- private _html2markdown;
27
- /**
28
- * Creates a new instance of the Markdown data processor class.
29
- */
30
- constructor(document: ViewDocument);
31
- /**
32
- * Keeps the specified element in the output as HTML. This is useful if the editor contains
33
- * features producing HTML that is not a part of the Markdown standard.
34
- *
35
- * By default, all HTML tags are removed.
36
- *
37
- * @param element The element name to be kept.
38
- */
39
- keepHtml(element: keyof HTMLElementTagNameMap): void;
40
- /**
41
- * Converts the provided Markdown string to a view tree.
42
- *
43
- * @param data A Markdown string.
44
- * @returns The converted view element.
45
- */
46
- toView(data: string): ViewDocumentFragment;
47
- /**
48
- * Converts the provided {@link module:engine/view/documentfragment~ViewDocumentFragment} to data format – in this
49
- * case to a Markdown string.
50
- *
51
- * @returns Markdown string.
52
- */
53
- toData(viewFragment: ViewDocumentFragment): string;
54
- /**
55
- * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
56
- * and not processed during the conversion from Markdown to view elements.
57
- *
58
- * The raw data can be later accessed by a
59
- * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `"$rawContent"`.
60
- *
61
- * @param pattern The pattern matching all view elements whose content should
62
- * be treated as raw data.
63
- */
64
- registerRawContentMatcher(pattern: MatcherPattern): void;
65
- /**
66
- * This method does not have any effect on the data processor result. It exists for compatibility with the
67
- * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.
68
- */
69
- useFillerType(): void;
15
+ /**
16
+ * HTML data processor used to process HTML produced by the Markdown-to-HTML converter and the other way.
17
+ */
18
+ private _htmlDP;
19
+ /**
20
+ * Helper for converting Markdown to HTML.
21
+ */
22
+ private _markdown2html;
23
+ /**
24
+ * Helper for converting HTML to Markdown.
25
+ */
26
+ private _html2markdown;
27
+ /**
28
+ * Creates a new instance of the Markdown data processor class.
29
+ */
30
+ constructor(document: ViewDocument);
31
+ /**
32
+ * Keeps the specified element in the output as HTML. This is useful if the editor contains
33
+ * features producing HTML that is not a part of the Markdown standard.
34
+ *
35
+ * By default, all HTML tags are removed.
36
+ *
37
+ * @param element The element name to be kept.
38
+ */
39
+ keepHtml(element: keyof HTMLElementTagNameMap): void;
40
+ /**
41
+ * Converts the provided Markdown string to a view tree.
42
+ *
43
+ * @param data A Markdown string.
44
+ * @returns The converted view element.
45
+ */
46
+ toView(data: string): ViewDocumentFragment;
47
+ /**
48
+ * Converts the provided {@link module:engine/view/documentfragment~ViewDocumentFragment} to data format – in this
49
+ * case to a Markdown string.
50
+ *
51
+ * @returns Markdown string.
52
+ */
53
+ toData(viewFragment: ViewDocumentFragment): string;
54
+ /**
55
+ * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
56
+ * and not processed during the conversion from Markdown to view elements.
57
+ *
58
+ * The raw data can be later accessed by a
59
+ * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `"$rawContent"`.
60
+ *
61
+ * @param pattern The pattern matching all view elements whose content should
62
+ * be treated as raw data.
63
+ */
64
+ registerRawContentMatcher(pattern: MatcherPattern): void;
65
+ /**
66
+ * This method does not have any effect on the data processor result. It exists for compatibility with the
67
+ * {@link module:engine/dataprocessor/dataprocessor~DataProcessor `DataProcessor` interface}.
68
+ */
69
+ useFillerType(): void;
70
70
  }
@@ -1,16 +1,16 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  export declare class MarkdownGfmHtmlToMd {
6
- private _processor;
7
- private _keepRawTags;
8
- constructor();
9
- keep(tagName: string): void;
10
- parse(html: string): string;
11
- /**
12
- * Returns handlers for raw HTML tags that should be kept in the Markdown output.
13
- */
14
- private _getRawTagsHandlers;
15
- private _buildProcessor;
6
+ private _processor;
7
+ private _keepRawTags;
8
+ constructor();
9
+ keep(tagName: string): void;
10
+ parse(html: string): string;
11
+ /**
12
+ * Returns handlers for raw HTML tags that should be kept in the Markdown output.
13
+ */
14
+ private _getRawTagsHandlers;
15
+ private _buildProcessor;
16
16
  }
@@ -2,3 +2,4 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
+
@@ -2,3 +2,4 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
+
package/dist/index.css CHANGED
@@ -3,5 +3,3 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
 
6
-
7
- /*# sourceMappingURL=index.css.map */
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module markdown-gfm
7
- */
8
- export { Markdown } from './markdown.js';
9
- export { PasteFromMarkdownExperimental } from './pastefrommarkdownexperimental.js';
10
- export { MarkdownGfmDataProcessor } from './gfmdataprocessor.js';
11
- export { MarkdownGfmMdToHtml, MarkdownGfmMdToHtmlDefaultPlugins } from './markdown2html/markdown2html.js';
12
- export { MarkdownGfmHtmlToMd } from './html2markdown/html2markdown.js';
13
- import './augmentation.js';
6
+ * @module markdown-gfm
7
+ */
8
+ export { Markdown } from "./markdown.js";
9
+ export { PasteFromMarkdownExperimental } from "./pastefrommarkdownexperimental.js";
10
+ export { MarkdownGfmDataProcessor } from "./gfmdataprocessor.js";
11
+ export { MarkdownGfmMdToHtml, MarkdownGfmMdToHtmlDefaultPlugins } from "./markdown2html/markdown2html.js";
12
+ export { MarkdownGfmHtmlToMd } from "./html2markdown/html2markdown.js";
13
+ import "./augmentation.js";