---
title: "Interface: IFitTextRectangleSettings | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/WidgetConfigurationInterfaces.IFitTextRectangleSettings/"
---

# Interface: IFitTextRectangleSettings

> A structure defining when and how the editor fits bounding rectangles to rich formatted text.

## Remarks

You can use these settings in [IRichTextDialogConfig](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/WidgetConfigurationInterfaces.IRichTextDialogConfig.md).

## Example

``` js
configuration = {
   widgets: {
       RichTextDialog: {
           bgColor: "lightgray",
           fitTextRectangle: {
               onAdd: "shrinkOrStretchToContent",
               onUpdate: "shrinkOrStretchToContent"
           },
           wysiwygMode: true
       }
   }
};
```

## Properties

### onAdd?

> `optional` **onAdd?**: `TextRectangleFitMode`

The fit mode for adding the text to the canvas.

***

### onUpdate?

> `optional` **onUpdate?**: `TextRectangleFitMode`

The fit mode for updating the text.
