@contentful/field-editor-rich-text 3.4.9 → 3.4.11

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * In HTML it's a valid structure to have a block element inside a link
3
+ *
4
+ * e.g: <a href="..."><h1> My link </h1><h2>is fancy</h2></a>
5
+ *
6
+ * However, that's not supported in Slate. There are generally two ways to
7
+ * handle this:
8
+ *
9
+ * a) Unwrap inner blocks while preserving the content.
10
+ * e.g. <a href="...">My link is fancy</a>
11
+ *
12
+ * b) Break the link into multiple elements with having each block
13
+ * element as a wrapper for an anchor with the same URL
14
+ * e.g. <h1><a href="...">My link</a></h1>
15
+ * and <h2><a href="...">is fancy</a></h2>
16
+ *
17
+ * We take approach (a) in here.
18
+ */
19
+ export declare const sanitizeAnchors: (doc: Document) => Document;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Add items as needed. Don't forget to adjust hyperscript.d.ts
5
5
  */
6
- export declare const jsx: <S extends "focus" | "text" | "anchor" | "editor" | "cursor" | "element" | "selection" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
6
+ export declare const jsx: <S extends "text" | "anchor" | "editor" | "focus" | "cursor" | "element" | "selection" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
7
7
  anchor: typeof import("slate-hyperscript/dist/creators").createAnchor;
8
8
  cursor: typeof import("slate-hyperscript/dist/creators").createCursor;
9
9
  editor: (tagName: string, attributes: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "3.4.9",
3
+ "version": "3.4.11",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "./dist/index.js",
6
6
  "module": "dist/field-editor-rich-text.esm.js",
@@ -74,5 +74,5 @@
74
74
  "@udecode/plate-test-utils": "^3.2.0",
75
75
  "react": ">=16.14.0"
76
76
  },
77
- "gitHead": "242b1d0f3dd4485581f0012d44bb7f79321f6dd6"
77
+ "gitHead": "d531b0b54c09104334376527982edb5617ec0293"
78
78
  }