{"id":23146,"library":"prosemirror","title":"prosemirror-py","description":"Python implementation of core ProseMirror modules for collaborative editing. Current version 0.6.1, requires Python >=3.10. Release cadence is irregular, with major upstream syncs every few months.","status":"active","version":"0.6.1","language":"python","source_language":"en","source_url":"https://github.com/fellowapp/prosemirror-py","tags":["prosemirror","collaborative-editing","rich-text","editor"],"install":[{"cmd":"pip install prosemirror","lang":"bash","label":"Install prosemirror"}],"dependencies":[],"imports":[{"note":"Schema is in the model subpackage","wrong":"from prosemirror import Schema","symbol":"Schema","correct":"from prosemirror.model import Schema"},{"note":"","wrong":"","symbol":"DOMParser","correct":"from prosemirror.model import DOMParser"},{"note":"Transform is in the transform subpackage","wrong":"from prosemirror import Transform","symbol":"Transform","correct":"from prosemirror.transform import Transform"},{"note":"","wrong":"","symbol":"Step","correct":"from prosemirror.transform import Step"},{"note":"The basic schema is in the schema_basic subpackage","wrong":"from prosemirror import schema","symbol":"schema","correct":"from prosemirror.schema_basic import schema"}],"quickstart":{"code":"from prosemirror.model import Schema, DOMParser\nfrom prosemirror.schema_basic import schema\n\n# Create a document from HTML\ndom_parser = DOMParser.from_schema(schema)\ndoc = dom_parser.parse('<p>Hello, world!</p>')\nprint(doc.to_json())\n# Output: {'type': 'doc', 'content': [{'type': 'paragraph', 'content': [{'type': 'text', 'text': 'Hello, world!'}]}]}","lang":"python","description":"Parse HTML into a ProseMirror document using the basic schema."},"warnings":[{"fix":"Use the library's internal UTF-16 handling (no custom string slicing).","message":"Python string slicing uses Unicode codepoints, but ProseMirror positions are UTF-16 code units. This affects text_between and diff calculations. Always use UTF-16 aware functions when computing positions.","severity":"gotcha","affected_versions":">=0.6.0"},{"fix":"Replace `is_text_block` with `is_textblock`.","message":"In v0.5.0, `is_text_block` was renamed to `is_textblock` to match upstream. Old code using `is_text_block` will break.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Upgrade to Python 3.10+.","message":"Python 3.9 and lower are no longer supported as of v0.5.0. Install may fail on older Python versions.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Import from subpackages like `prosemirror.model`.","message":"Importing from `prosemirror` directly (e.g., `from prosemirror import Schema`) does not work. Use the full subpackage path.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install prosemirror`.","cause":"Package not installed or installed under a different name.","error":"ModuleNotFoundError: No module named 'prosemirror'"},{"fix":"Use `from prosemirror.model import Schema`.","cause":"Trying to import Schema from the top-level package instead of subpackage.","error":"ImportError: cannot import name 'Schema' from 'prosemirror'"},{"fix":"Use `is_textblock` instead.","cause":"Using old attribute name `is_text_block` which was renamed in v0.5.0.","error":"KeyError: 'is_text_block'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}