edwh-editorjs 2.2.1__py3-none-any.whl → 2.2.2__py3-none-any.whl
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.
- editorjs/__about__.py +1 -1
- editorjs/blocks.py +3 -3
- editorjs/core.py +2 -2
- {edwh_editorjs-2.2.1.dist-info → edwh_editorjs-2.2.2.dist-info}/METADATA +1 -1
- edwh_editorjs-2.2.2.dist-info/RECORD +10 -0
- edwh_editorjs-2.2.1.dist-info/RECORD +0 -10
- {edwh_editorjs-2.2.1.dist-info → edwh_editorjs-2.2.2.dist-info}/WHEEL +0 -0
editorjs/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.2.
|
|
1
|
+
__version__ = "2.2.2"
|
editorjs/blocks.py
CHANGED
|
@@ -470,7 +470,7 @@ class QuoteBlock(EditorJSBlock):
|
|
|
470
470
|
return default_to_text(node)
|
|
471
471
|
|
|
472
472
|
|
|
473
|
-
@block("raw")
|
|
473
|
+
@block("raw", "html")
|
|
474
474
|
class RawBlock(EditorJSBlock):
|
|
475
475
|
|
|
476
476
|
@classmethod
|
|
@@ -480,11 +480,11 @@ class RawBlock(EditorJSBlock):
|
|
|
480
480
|
|
|
481
481
|
@classmethod
|
|
482
482
|
def to_json(cls, node: MDChildNode) -> list[dict]:
|
|
483
|
-
|
|
483
|
+
return [raw_block(cls.to_text(node))]
|
|
484
484
|
|
|
485
485
|
@classmethod
|
|
486
486
|
def to_text(cls, node: MDChildNode) -> str:
|
|
487
|
-
|
|
487
|
+
return node.get("value", "")
|
|
488
488
|
|
|
489
489
|
|
|
490
490
|
@block("table")
|
editorjs/core.py
CHANGED
|
@@ -41,7 +41,7 @@ class EditorJS:
|
|
|
41
41
|
for child in blocks:
|
|
42
42
|
_type = child["type"]
|
|
43
43
|
if not (block := BLOCKS.get(_type)):
|
|
44
|
-
raise TypeError(f"Unsupported block type `{_type}`")
|
|
44
|
+
raise TypeError(f"from_json: Unsupported block type `{_type}`")
|
|
45
45
|
|
|
46
46
|
data = child.get("data", {})
|
|
47
47
|
# forward any 'tunes' via data:
|
|
@@ -76,7 +76,7 @@ class EditorJS:
|
|
|
76
76
|
for child in self._mdast["children"]:
|
|
77
77
|
_type = child["type"]
|
|
78
78
|
if not (block := BLOCKS.get(_type)):
|
|
79
|
-
raise TypeError(f"Unsupported block type `{_type}`")
|
|
79
|
+
raise TypeError(f"to_json: Unsupported block type `{_type}`")
|
|
80
80
|
|
|
81
81
|
blocks.extend(block.to_json(child))
|
|
82
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: edwh-editorjs
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: EditorJS.py
|
|
5
5
|
Project-URL: Homepage, https://github.com/educationwarehouse/edwh-EditorJS
|
|
6
6
|
Author-email: SKevo <skevo.cw@gmail.com>, Robin van der Noord <robin.vdn@educationwarehouse.nl>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
editorjs/__about__.py,sha256=toAYzE_ok1SiBE0AqAVdW0O8YCXCwcx0w4JATYQuJOg,22
|
|
2
|
+
editorjs/__init__.py,sha256=-OHUf7ZXfkbdFB1r85eIjpHRfql-GCNUCKuBEdEt2Rc,58
|
|
3
|
+
editorjs/blocks.py,sha256=2Mdbs0YjE8TV5a2rNTVXpS-9IK6P7Zgkq0LOUnQ4sv8,24569
|
|
4
|
+
editorjs/core.py,sha256=WSBmAIKwSqHIP_NFmUVUJiyHPgq7D8902Jm9HRf1nSk,3669
|
|
5
|
+
editorjs/exceptions.py,sha256=TyfHvk2Z5RbKxTDK7lrjgwAgVgInXIuDW63eO5jzVFw,106
|
|
6
|
+
editorjs/helpers.py,sha256=q861o5liNibMTp-Ozay17taF7CTNsRe901lYhhxdwHg,73
|
|
7
|
+
editorjs/types.py,sha256=W7IZWMWgzJaQulybIt0Gx5N63rVj4mEy73VJWo4VAQA,1029
|
|
8
|
+
edwh_editorjs-2.2.2.dist-info/METADATA,sha256=JF4ubEgQPnh1CDJdOh6dOPMLRlmaDW1IGYhqRToUoFY,972
|
|
9
|
+
edwh_editorjs-2.2.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
10
|
+
edwh_editorjs-2.2.2.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
editorjs/__about__.py,sha256=4dqvKTDgbqeyzbWj6hYiNdzxsI8j1YOKSLM8vF6a0j4,22
|
|
2
|
-
editorjs/__init__.py,sha256=-OHUf7ZXfkbdFB1r85eIjpHRfql-GCNUCKuBEdEt2Rc,58
|
|
3
|
-
editorjs/blocks.py,sha256=p5vPOM-YGbx_UL8b2pA2tXXmCrTMn4K-UaeUdsiZp5A,24528
|
|
4
|
-
editorjs/core.py,sha256=FtdPWeY05PWOQ2JY1rPdZdnXL5g_LrrCfRy0HfjkXqM,3649
|
|
5
|
-
editorjs/exceptions.py,sha256=TyfHvk2Z5RbKxTDK7lrjgwAgVgInXIuDW63eO5jzVFw,106
|
|
6
|
-
editorjs/helpers.py,sha256=q861o5liNibMTp-Ozay17taF7CTNsRe901lYhhxdwHg,73
|
|
7
|
-
editorjs/types.py,sha256=W7IZWMWgzJaQulybIt0Gx5N63rVj4mEy73VJWo4VAQA,1029
|
|
8
|
-
edwh_editorjs-2.2.1.dist-info/METADATA,sha256=S_ulJgMQGRsEbnCziWID8qMF1gp74brQiuJWGc9hjQ8,972
|
|
9
|
-
edwh_editorjs-2.2.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
10
|
-
edwh_editorjs-2.2.1.dist-info/RECORD,,
|
|
File without changes
|