
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
A minimal, fast, Python 3.6+ package for parsing Editor.js content.
bleach
library;EditorJsParseError
if data is malformed; pip install pyeditorjs
Optional: install bleach for clean HTML:
pip install bleach
from pyeditorjs import EditorJsParser
editor_js_data = ... # your Editor.js JSON data
parser = EditorJsParser(editor_js_data) # initialize the parser
html = parser.html(sanitize=True) # `sanitize=True` requires `bleach` to be installed
print(html) # your clean HTML
WARNING: This does not sanitize the texts! Please, call
bleach.clean(...)
directly. This also doesn't obtain text from bold texts, markers, etc... - you should use BeautifulSoup for this.
#import bleach
from pyeditorjs import EditorJsParser
editor_js_data = ... # your Editor.js JSON data
parser = EditorJsParser(editor_js_data) # initialize the parser
all_texts = []
for block in parser:
text = getattr(block, 'text', None)
if text:
all_texts.append(text) # all_texts.append(bleach.clean(text))
print(all_texts)
This is a community-provided project, and is not affiliated with the Editor.js team. It was created in my spare time. I cannot make sure that it will receive consistent updates.
Because of this, PRs, bug reports and suggestions are welcome!
FAQs
pyEditorJS
We found that pyeditorjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.