# @portabletext/html ## 2.0.3 ### Patch Changes - [#3714](https://github.com/portabletext/editor/pull/3714) [`93ec1cc`](https://github.com/portabletext/editor/commit/93ec1cc4c71968611345b3ee3847e2ad30df463c) Thanks [@christianhg](https://github.com/christianhg)! - fix(html): point the npm homepage to www.portabletext.org The package's npm page now links to https://www.portabletext.org. - Updated dependencies [[`4b15514`](https://github.com/portabletext/editor/commit/4b155140891f0b93ce56ae6b4f4eec0274d94dd7)]: - @portabletext/schema@3.1.1 ## 2.0.2 ### Patch Changes - Updated dependencies [[`329cd2e`](https://github.com/portabletext/editor/commit/329cd2e27dc27f81ff4577e9d02c95471a56c846)]: - @portabletext/schema@3.1.0 ## 2.0.1 ### Patch Changes - Updated dependencies [[`e81e09e`](https://github.com/portabletext/editor/commit/e81e09e5885039fd3891ae0b091d9ae0d487f293)]: - @portabletext/schema@3.0.1 ## 2.0.0 ### Major Changes - [#3110](https://github.com/portabletext/editor/pull/3110) [`09aa881`](https://github.com/portabletext/editor/commit/09aa8813211bc26d1a75f94a2ff619fae6e132cb) Thanks [@christianhg](https://github.com/christianhg)! - feat!: drop the legacy `main` and `module` fields Every package now declares its entry points through the `exports` map only. Node, all maintained bundlers, and TypeScript (`moduleResolution: 'bundler'`, 'node16', or 'nodenext') resolve through `exports`; only tooling that predates `exports` support read `main` or `module` and can no longer resolve these packages. - [#3106](https://github.com/portabletext/editor/pull/3106) [`3ce5a1d`](https://github.com/portabletext/editor/commit/3ce5a1d00caec9593a4f8d240d05df90505ca655) Thanks [@christianhg](https://github.com/christianhg)! - feat!: require node 22.12 or later Node.js 22.12 or later is now required. The previous range also allowed Node.js 20.19 and later; Node.js 20 reached end of life in April 2026 and is no longer supported. `@portabletext/editor` and `@portabletext/markdown` also move to `@portabletext/to-html` v6 and `@portabletext/toolkit` v6, which carry the same Node.js requirement. ### Patch Changes - Updated dependencies [[`09aa881`](https://github.com/portabletext/editor/commit/09aa8813211bc26d1a75f94a2ff619fae6e132cb), [`3ce5a1d`](https://github.com/portabletext/editor/commit/3ce5a1d00caec9593a4f8d240d05df90505ca655)]: - @portabletext/schema@3.0.0 ## 1.2.0 ### Minor Changes - [#3074](https://github.com/portabletext/editor/pull/3074) [`b7610ec`](https://github.com/portabletext/editor/commit/b7610ecf5a8a1edf59c9b18099fac36bfd4014a1) Thanks [@christianhg](https://github.com/christianhg)! - feat: add `createTableRule` for deserializing `
` first row, and omitted when there are none. Ragged rows are padded to the widest row with empty cells, and `colspan`/`rowspan` are ignored: a spanning cell contributes one cell, and the padding fills the rest. The `containers` option matches a `defineTable` call whose container names were renamed. It is role-keyed like `defineTable`'s own option and reads only `type` and `arrayField`, so the same container definitions can be passed to both.
### Patch Changes
- [#3078](https://github.com/portabletext/editor/pull/3078) [`0e3505b`](https://github.com/portabletext/editor/commit/0e3505b6412781d237ae4b39b67f2fe730c0c7f7) Thanks [@christianhg](https://github.com/christianhg)! - fix: scope `createFlattenTableRule`'s row and cell lookup to its own table
A table containing another table in one of its cells was not flattened at all: its cells came through as separate blocks, as if the rule had not been passed. Rows and cells are now read from the table's own `rows` and `cells` collections, so a nested table stays inside the cell that holds it.
## 1.1.2
### Patch Changes
- [#3042](https://github.com/portabletext/editor/pull/3042) [`cddbf04`](https://github.com/portabletext/editor/commit/cddbf041ded81ac7fe3ee6e5aed0869f014f420c) Thanks [@stipsan](https://github.com/stipsan)! - fix: add a `module` entry point
Every package now declares `module` alongside `main`, pointing at the ESM build.
Bundlers that predate `exports` use it to pick the ESM output instead of falling
back to `main`.
- Updated dependencies [[`cddbf04`](https://github.com/portabletext/editor/commit/cddbf041ded81ac7fe3ee6e5aed0869f014f420c)]:
- @portabletext/schema@2.2.4
## 1.1.1
### Patch Changes
- Updated dependencies [[`dd6b40c`](https://github.com/portabletext/editor/commit/dd6b40c3a34df1added8637e4163f4cd970ac310)]:
- @portabletext/schema@2.2.3
## 1.1.0
### Minor Changes
- [#2790](https://github.com/portabletext/editor/pull/2790) [`e8beb17`](https://github.com/portabletext/editor/commit/e8beb1732b3e1483d787ddddd419e145d7cae51d) Thanks [@christianhg](https://github.com/christianhg)! - feat: map Google Docs monospace text to code blocks and `code` decorators
Pasting code from Google Docs now preserves it. Google Docs has no semantic markup for code; the only signal is a monospace `font-family` on spans (e.g. `font-family:'Roboto Mono',monospace`), which was previously ignored, so code paragraphs deserialized as plain text.
A run of consecutive paragraphs whose text is entirely monospace now becomes a single `code` block object (lines joined with newlines) when the schema defines a `code` block object with a `code` string field. Blank lines inside the run stay inside the code block, and indentation is preserved (whitespace inside spans that combine a monospace font with `white-space:pre-wrap` is treated as content). Monospace spans inside mixed paragraphs get the `code` decorator when the schema defines one. Schemas that can hold neither produce the same plain text as before.
Note that the detection is a heuristic: a document deliberately styled entirely in a monospace font will deserialize as one code block.
- [#2790](https://github.com/portabletext/editor/pull/2790) [`01194f7`](https://github.com/portabletext/editor/commit/01194f78252045e13a3187e0fb5d1639a93bd4e8) Thanks [@christianhg](https://github.com/christianhg)! - feat: deserialize `` into a code block object
` |
|---|