--- title: li-target-length description: "Provide a suggested total character count for the text in the document." --- ## History | Version | Change | | ------- | ------ | | release-2025-05 | Table dashboard support was added in the `2025-05` release. | | release-2025-07 | Add `unit` and `showExactCountCheckbox` config support. | | release-2025-09 | Support an array in the `unit` config to enable both selectors in the metadata UI. | | release-2025-11 | Add `modes` UI config property. | ## Supported Features | Feature | Supported | | ------- | :-------: | | Document | ✔ | | Media | ✗ | | Include | ✗ | | Document Creation Flow | ✗ | | Push Message | ✗ | | Usage Log | ✗ | | Table Dashboard | ✔ | | Display Filter | ✗ | | Search Indexing | ✗ | | System Metadata | ✗ | | Planning System | ✗ | | Webhook Conditions | ✗ | ## Description Enables users to define a target length for a document. The plugin provides feedback to help maintain content within a desired range. ## Default UI ### Metadata Panel Within the document's metadata panel, users can set the desired target length. The plugin offers multiple input modes, and displays the first available one in this priority order: `steps`, `characters`, `lines`. Users can switch between any configured modes. #### Input Mode: `steps` ![Input Mode: Steps](/reference/document/metadata/images/li-target-length-steps.png) #### Input Mode: `characters` ![Input Mode: Characters](/reference/document/metadata/images/li-target-length-characters.png) #### Input Mode: `lines` ![Input Mode: Lines](/reference/document/metadata/images/li-target-length-lines.png) ### Editor Once a target length is configured, the editor displays an indicator in the bottom left corner. The indicator includes: - Difference to target length - Total document length - Target length - Length of the currently focused component ![Target Length Indicator](/reference/document/metadata/images/li-target-length-indicator.png) ## Storage Format ```js { characters: , unit: , isChecked: } ``` ## Content Type Config ```js { handle: 'myContentType', // ... metadata: [ { handle: 'myHandle' type: 'li-target-length', ui: { config: { // Defines which input modes are available to users: // - steps: A slider with pre-configured step values, // requires `steps` to be configured (see below). // - characters: A number input for entering a // character count. // - lines: A number input for entering a line count. // Requires lineCountFraction to convert between // characters and lines. // Added in release-2025-11 modes: ['steps', 'characters', 'lines'], // Defines the selectable steps when the input mode is // "steps" (see above). steps: [ { // Use a short label, e.g. "S", "M", "L" label: 'S', // Number of characters value: 100 }, { label: 'M', value: 200 } ], // Optional. Number of characters above or below `value` // considered acceptable when writing a document acceptedCharacterDifference: 20, // Optional. Only allows the input of an exact number // instead of picking a step. // Deprecated in release-2025-11 // Removed in release-2026-05 allowAnyNumber: true, // Optional. Specifies the input unit for exact number // inputs. It can be either `characters` or `lines`. In // the case of `lines`, the lineCountFraction setting is // required to convert between characters and lines. // Starting with release-2025-09, multiple units can be // specified as an array. Previously, only a single unit // (string) was supported. // Deprecated in release-2025-11 // Removed in release-2026-05 unit: 'lines', // Optional. Allows the input of an exact number besides // picking a step. Users can toggle between the input // modes. // Added in release-2025-07 // Deprecated in release-2025-11 // Removed in release-2026-05 showExactCountCheckbox: true } } } // ... ] } ```