Skip to main content

ToInline

Converts the current form to an inline form.

note

A picture form can't be converted to an inline form, as it's always a fixed-size object.

Inherited from ApiFormBase.ToInline.

Syntax​

expression.ToInline();

expression - A variable that represents an ApiComplexForm class.

Parameters​

This method doesn't have any parameters.

Returns​

boolean

Example​

Convert a fixed-size complex form back to an inline form in a document.

// How do I switch a complex form from fixed size to inline in a document?

// Remove fixed dimensions from a copied form so it flows with the surrounding text in a document.

let doc = Api.GetDocument();
let complexForm = Api.CreateComplexForm({"key": "Complex1"});
complexForm.Add('Complex form');
let paragraph = doc.GetElement(0);
paragraph.AddElement(complexForm);
complexForm.ToFixed(7 * 240, 2 * 240);
let copyForm = complexForm.Copy();
paragraph = Api.CreateParagraph();
paragraph.AddElement(copyForm);
doc.Push(paragraph);
copyForm.ToInline();
let isFixed = complexForm.IsFixed();
let isFixedCopy = copyForm.IsFixed();
paragraph = Api.CreateParagraph();
paragraph.AddText("The first form from this document has a fixed size: " + isFixed);
paragraph.AddLineBreak();
paragraph.AddText("The second form from this document has a fixed size: " + isFixedCopy);
doc.Push(paragraph);