<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Nutrient Document Authoring Releases</title>
        <link>https://www.nutrient.io/guides/document-authoring/</link>
        <description>Release notes for Nutrient Document Authoring SDK</description>
        <lastBuildDate>Mon, 08 Jun 2026 00:00:00 GMT</lastBuildDate>
    <pubDate>Mon, 08 Jun 2026 00:00:00 GMT</pubDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en-US</language>
        <atom:link href="https://www.nutrient.io/guides/document-authoring/release-notes/feed.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[1.15.0 release notes]]></title>
            <link>https://www.nutrient.io/guides/document-authoring/release-notes/1-15-0/</link>
            <guid isPermaLink="false">https://www.nutrient.io/guides/document-authoring/release-notes/1-15-0/</guid>
            <pubDate>Mon, 08 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Lists important changes for Nutrient Document Authoring SDK 1.15.0]]></description>
            <content:encoded><![CDATA[### Breaking changes

This release includes one breaking change.

#### Sections are now stored around section breaks

This release changes how sections are stored, organizing them around section breaks instead of a list. Rather than grouping content under each section, the document body now contains one continuous list of block-level elements. Each section ends with a paragraph containing a section break (an inline element), and the content from one such paragraph to the next forms a section.

**Impact:** Stored documents need no action, because older DocJSON is upgraded automatically on load. You only need to update code that reads or constructs raw DocJSON directly, or that uses the section-mutation programmatic API.

**DocJSON changes**

- `body.sections` (an array of sections, each with its own elements) is removed.
- `body.elements` is now a single list of block-level elements (paragraphs and tables) for the body, with section boundaries marked inline rather than by grouping.
- Section boundaries are marked by a new `break/section` inline element on the last paragraph of a section.
- `body.finalSectionPr` holds the trailing section’s properties (the last section has no closing break).

**New programmatic API**

- `Body.content(): BlockLevelContainer` returns a single block-level container for the whole document.
- `Paragraph.hasSectionBreak(): boolean`, `addSectionBreak(): void`, `removeSectionBreak(): void`, and `findSection(): Section | undefined` let you inspect, add, remove, and locate section breaks on a paragraph, respectively.
- `Table.findSection(): Section | undefined` returns the section a table belongs to.

**Migration**: Replace iteration over `body.sections()` and the `body.addSection()`/`body.removeSection()`/`section.replaceText()` mutators with the new flat body and per-paragraph section-break controls.

Before:

```ts
// Iterate per-section content.
for (const section of body.sections()) {
  for (const block of section.content().blocklevels()) {
    /* ... */
  }
}

// Add or remove sections via the body.
body.addSection(/* ... */);
body.removeSection(/* ... */);

// Mutate section text in place.
section.replaceText(/* ... */);
```

After:

```ts
// Iterate the whole body as one flat block-level container.
for (const block of body.content().blocklevels()) {
  /* ... */
}

// Section is now a properties-only handle; find the one a block belongs to.
const section = paragraph.findSection(); // or table.findSection()

// Split or merge sections by toggling the break on a paragraph.
if (!paragraph.hasSectionBreak()) {
  paragraph.addSectionBreak();
} else {
  paragraph.removeSectionBreak();
}
```

`Section.content()`, `Section.replaceText()`, `Body.addSection()`, and `Body.removeSection()` are removed. `Body.sections()` always returns `N + 1` entries, where `N` is the number of paragraphs carrying a section break (the last entry is the trailing section). Callers that assumed `sections().length` matches the number of section breaks must be updated.

### Command palette

This release adds a command palette (open with `Mod+/` or the toolbar button) for searching and executing editor actions. Parameterized actions (zoom levels, font sizes, colors, and so on) are expanded into individual entries.

The palette is wired into the public Actions and Toolbar APIs as the built-in `view.open-command-palette` action and the `command-palette` toolbar item, so it can be re-bound, repositioned, or removed via `editor.setActions()` and the toolbar configuration.

### Selection content APIs

This release adds new APIs for reading the current selection and inserting content at the cursor.

- Added `getSelectionContent()` to read the current selection as plain text or as a portable fragment.
- Added `insertContentAtCursor()` to insert text or a fragment at the cursor, replacing any active range selection.
- Added `hasActiveCursor()` to check whether the editor has an insertion point before attempting content writes.
- Fragments use a versioned wire format with tagged errors (`isInvalidFragmentTypeError`, `isUnsupportedFragmentVersionError`, `isMissingFragmentContentError`) for safe roundtripping.
- `insertContentAtCursor()` accepts an `inlineFormatting` option to either preserve source formatting or adopt the destination’s.

### Programmatic API for paragraph properties

This release adds a programmatic API for paragraph properties.

Supported properties cover:

- **Built-in styles** — `styleId: 'Normal'`, `'Title'`, `'Subtitle'`, and `'Heading 1'`–`'Heading 6'`.
- **Alignment** — `'left'`, `'center'`, `'right'`, or `'justify'`.
- **Spacing** — `lineSpacingFactor`, `spaceBefore`, `spaceAfter`, and `contextualSpacing`.
- **Indentation** — `left`, `right`, and first-line shift (negative values produce a hanging indent).
- **Tab stops** — `position`, `alignment`, and `leader`.
- **Border** — per-side colors, widths, spaces, and corner radii.
- **Shading** — a single fill color (hex).

### Table cell padding

This release adds support for top and bottom table cell padding, complementing the existing left and right padding.

### Deprecations

- `doc.exportPDF()`, `doc.exportDOCX()`, and `system.importDOCX()` are deprecated in favor of the unified `doc.export({ format })` and `system.import(blob, { format })`.
- `editor.insertTextAtCursor()` is deprecated in favor of `editor.insertContentAtCursor({ content })`.

### Stability and bug fixes

- Fixes `moveTo` track change DOCX import.
- Fixes an issue where text selection would be reset when the page scrollbar is clicked.
- Fixes comment reply DOCX export.

[changelog]: /guides/document-authoring/changelog/#1.15.0
[body-content]: /api/document-authoring/types/programmatic/body/#content
[paragraph-has-section-break]: /api/document-authoring/types/programmatic/paragraph/#hassectionbreak
[paragraph-add-section-break]: /api/document-authoring/types/programmatic/paragraph/#addsectionbreak
[paragraph-remove-section-break]: /api/document-authoring/types/programmatic/paragraph/#removesectionbreak
[paragraph-find-section]: /api/document-authoring/types/programmatic/paragraph/#findsection
[table-find-section]: /api/document-authoring/types/programmatic/table/#findsection
[built-in-action-id]: /api/document-authoring/types/builtinactionid/
[toolbar-item]: /api/document-authoring/types/toolbaritem/
[set-actions]: /api/document-authoring/types/docautheditor/#setactions
[get-selection-content]: /api/document-authoring/types/docautheditor/#getselectioncontent
[insert-content-at-cursor]: /api/document-authoring/types/docautheditor/#insertcontentatcursor
[has-active-cursor]: /api/document-authoring/types/docautheditor/#hasactivecursor
[export-pdf]: /api/document-authoring/types/docauthdocument/#exportpdf
[export-docx]: /api/document-authoring/types/docauthdocument/#exportdocx
[import-docx]: /api/document-authoring/types/docauthsystem/#importdocx
[export]: /api/document-authoring/types/docauthdocument/#export
[import]: /api/document-authoring/types/docauthsystem/#import
[insert-text-at-cursor]: /api/document-authoring/types/docautheditor/#inserttextatcursor

Lists important changes for Nutrient Document Authoring SDK 1.15.0]]></content:encoded>
        </item>
    </channel>
</rss>