Release Notes > 12.1.0.0 > Updates in This Release > Insert Markup > Using Inserts
  
Using Inserts
Introduction
As a template developer, you have created a set of insert markup definitions and applied them either to the template or to the application defaults. The next question is how to use them? This section describes how.
Using Insert Markup
To use your definitions, a macro and an FOM method are provided. Consider the set of definitions we used earlier:
var defList = template.insertMarkupDefinitions;
defList.bold = {
markupStart: "<b>",
markupEnd: "</b>",
type: "none"};
defList.textHeight = {
title: "Select text height",
type: "length",
markupStart: "<tweak property=\"textHeight\" value=\"$1\">",
markupEnd: "</tweak>",
values: "10pt, 12pt, 14pt, 18pt, 24pt",
default: "12pt"};
The tinsertmarkup macro can be used with the definition. Using the macro without any ‘name’ will not do anything, a ‘name’ is required.
tinsertmarkup “bold” will insert <b> and </b>
tinsertmarkup “textHeight” will pop up a dialog with the title “Select text height” and a picker to choose from the list of values. The default will be set to 12pt. OKing the dialog will insert <tweak property=”textHeight” value=”12pt”> and </tweak>
tinsertmarkup “textHeight” “14pt” will not pop up the dialog but will insert the markup <tweak property=”textHeight” value=”14pt”> and </tweak>
The fStream.insertMarkup() method will work in a similar fashion:
fStream.insertMarkup(“bold”) will insert <b> and </b>
fStream.insertMarkup(“textHeight”, “24pt”) will insert <tweak property=”textHeight” value=”14pt”> and </tweak>
Clearly you wouldn’t just use fStream.insertMarkup() in your code like this — you would use something more like
var stream = content.getStream("mainText");
stream.seek(234,0);
stream.insertMarkup("bold");
Or even, using the stream active in the yellow bar including selected content
var stream = display.editStream;
stream.insertMarkup("bold");