Skip to content

Changelog

All notable changes to BlockNote-py will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.3.1] - 2025-10-29

Added

  • BlockNote โ†’ PDF Converter: New blocks_to_pdf and blocks_to_pdf_with_template helpers that generate PDFs from BlockNote blocks using WeasyPrint, plus tests covering inline styling, templates, and error handling (src/converter/blocknote_to_pdf.py).

Changed

  • SEO & Metadata Enhancements: Updated README, documentation landing page, and project metadata (PyPI keywords, MkDocs meta tags, structured data) to improve discoverability for queries such as "blocknote python" and "blocknote py".

[0.2.0] - 2025-10-16

Added

  • HTML Conversion Support: Full bidirectional HTML conversion
  • html_to_blocks(): Parse HTML and convert to BlockNote blocks
  • blocks_to_html(): Convert BlockNote blocks to clean, semantic HTML
  • Rich Text Styling: Complete styling support
  • Bold, italic, underline, strikethrough formatting
  • Text and background colors
  • Inline code formatting
  • Custom CSS styles preservation
  • Enhanced Block Support:
  • Checkbox list items with checked/unchecked state
  • All major BlockNote block types (paragraphs, headings, lists, quotes, tables)
  • Nested block structures
  • Security Features:
  • HTML sanitization and XSS protection
  • Safe HTML entity escaping
  • Professional Documentation:
  • Complete MkDocs documentation site with Material theme
  • Comprehensive guides (installation, quick start, basic usage)
  • Detailed converter documentation for all 6 converters
  • API reference with auto-generated documentation
  • Real-world usage examples (basic and advanced patterns)
  • GitHub Pages deployment with automatic updates
  • Testing: Comprehensive test suite with 74+ tests covering all functionality

Changed

  • Enhanced PyPI Metadata: Better discoverability with keywords, classifiers, and project URLs
  • Improved README: Clean, focused design directing users to comprehensive documentation
  • Better Dependencies: More precise version constraints and optional dependency groups
  • Enhanced Error Handling: Improved error messages and validation across all converters
  • Type Safety: Enhanced Pydantic validation and type hints

Fixed

  • HTML parsing edge cases and malformed HTML handling
  • Style preservation in HTML conversion
  • Empty block handling in all converters
  • Dependency conflicts in development environment

Security

  • Added HTML sanitization to prevent XSS attacks
  • Safe escaping of HTML special characters

[0.1.0] - 2025-10-08

Added

  • Initial release of BlockNote-py
  • Core schema definitions (Block, InlineContent)
  • BlockNote to Dictionary converter (blocks_to_dict())
  • Dictionary to BlockNote converter (dict_to_blocks())
  • BlockNote to Markdown converter (blocks_to_markdown())
  • Markdown to BlockNote converter (markdown_to_blocks())
  • Pydantic-based data validation
  • Basic documentation and examples
  • MIT license
  • GitHub repository setup
  • CI/CD pipeline with GitHub Actions
  • PyPI package publishing

Supported Block Types

  • Paragraph blocks
  • Heading blocks (levels 1-6)
  • Bullet list items
  • Numbered list items
  • Quote blocks
  • Basic table support

Supported Inline Styles

  • Bold text
  • Italic text
  • Basic text formatting

Release Notes

Version 0.1.0

This is the initial release of BlockNote-py, providing Python developers with tools to work with BlockNote.js data structures. The library focuses on type safety, ease of use, and comprehensive format conversion capabilities.

Key Features: - ๐Ÿ”„ Bidirectional conversion between BlockNote and multiple formats - ๐Ÿ›ก๏ธ Type-safe operations with Pydantic validation - ๐Ÿ“ Support for rich text formatting - ๐Ÿงช Comprehensive test coverage - ๐Ÿ“š Detailed documentation and examples

Getting Started:

pip install blocknote-py

Basic Usage:

from blocknote.converter import blocks_to_html
from blocknote.schema import Block, InlineContent

block = Block(
    id="1",
    type="paragraph",
    content=[InlineContent(type="text", text="Hello, World!")]
)

html = blocks_to_html([block])
print(html)  # <p>Hello, World!</p>


Migration Guide

From Pre-release to 0.1.0

If you were using pre-release versions, please note:

  1. Import Changes:

    # Old
    from blocknote import Block, InlineContent
    
    # New
    from blocknote.schema import Block, InlineContent
    

  2. Converter Imports:

    # Old
    from blocknote.converters import blocks_to_dict
    
    # New
    from blocknote.converter import blocks_to_dict
    

  3. Schema Updates:

  4. Block validation is now stricter
  5. Content field must be a list of InlineContent objects
  6. Props field is now optional and defaults to empty dict

Upcoming Features

Planned for v0.2.0

  • [ ] Advanced table support with cell formatting
  • [ ] Image and media block support
  • [ ] Custom block type extensibility
  • [ ] Performance optimizations for large documents
  • [ ] Additional export formats (PDF, DOCX)

Planned for v0.3.0

  • [ ] Real-time collaboration support
  • [ ] Plugin system for custom converters
  • [ ] Advanced styling options
  • [ ] Internationalization support

Contributing

We welcome contributions! See our Contributing Guide for details on how to get started.

Recent Contributors


Support


This changelog is automatically updated with each release. For the most up-to-date information, check the GitHub releases page.