Skip to content
pinegrow.com

Add elements to the page

Let’s take a look at how you can add new HTML elements to the page.

On this page

As always in Pinegrow, you can add elements in a couple of different ways. Choose the one that suits your task at hand the most.

Open the Library

Open the Library panel.

Click + Insert in the top toolbar to open the Library. It contains elements and components (ready-made groups of elements) arranged in sections.

The top of the Pinegrow window with the menu bar and the toolbar; an arrow points to the blue + Insert button: Click to open the Library.
The Insert Element window, the Library, opened with the Insert button: List and Images tabs, a search field, Insert code, and the Plain HTML element groups Layout, Content and Media with element buttons, followed by Sections, Grouping elements, Text, Edits and External content.
The Library panel.

What sections are shown depends on which frameworks and libraries are activated on your page. For example, if Bootstrap support is active a bunch of Bootstrap-related sections and components will be listed in the Library.

Moving the mouse over an element in the Library will show the preview of the element.

Drag element to the page view

Open the Library panel.

Grab the element from the Library panel and drag it over the page.

As you move it over the page (while still holding down the mouse button) you’ll see two things:

A p element being dragged from the Library onto the page: the target paragraph p.lead is outlined with its size, a green line shows where the new paragraph will go, and the drag tooltip says to hold Cmd to target grid cells or hold over text to insert into text.
Dragging the element from Library to the page.

The target element is highlighted with a green border and a green line shows where in relation to the target element the new element will be inserted.

Drop the element at your chosen destination by releasing the mouse button.

You can use Repeater to insert more copies of the element. Type a number before or during the dragging operation with 0 to 9 keys to set how many copies of the element you want to insert.

Press ESC to abort the drag & drop operation without adding the element to the page.

Drag elements to the Tree

Open the Library and the Tree panels.

Dragging elements from the Library to the Tree gives you precise control over the placement of new elements.

Take the element from the Library and drag it over the tree. Insertion line will show the position.

A section element dragged from the Insert library over the Tree panel, with a dashed drop placeholder after p.note-hero and a tip about holding CMD to target grid cells.
Dragging a section element from the Library to the Tree panel.

Release the mouse to insert the element at the indicated position.

You can use Repeater to insert more copies of the element.

Press ESC to abort the drag & drop operation without adding the element to the page.

Insert into the selected elements

Open the Library panel.

Selected element is required

You have to select one or more elements on the page to use this feature.

Right click on the element in the Library and choose the placement of the new element in relation to the selected element:

The context menu of the h2 element in the Library, marked by a callout, with the page's h1 selected: Insert options Prepend to h1, Append to h1, Insert before h1, Insert after h1, Replace h1 and Replace keeping attributes, and Copy code.
Insert with right click on the Library element.

Use Repeater to insert more than one element to the page.

“Insert into selected” Library section

In addition, for some types of selected elements, for example the body, Pinegrow suggests elements that can be inserted into the element.

The Insert Element window, the Library, with the body element selected on the page: the Insert into selected section at the top lists header, main, section and footer, and an arrow points to them: Click to insert.
Elements suggested for the selected body.

Such suggestions are listed in “Insert into selected” section. To insert such element into the selected element click on the name or right click on the name for more options.

Inserting code

Library panel lets you enter code directly to the page.

Click Insert code at the top of the Library to open the section and enter the HTML or simplified Pug syntax for the element you wish to add to the page.

A Library panel element representing the code will appear below the code editor.

The Insert code section of the Library with the HTML p class note A short field note typed in, and below it a p.note element ready to drag with a Drag me to the page hint, marked by a callout: Drag it to the page or the Tree.
Insert code from the Library panel.

Use it as you would use a normal Library element: drag it to the page, to the tree or use right click to insert it into the selected element.

Quick insert into the selected element

Selected element is required

You have to select one or more elements on the page to use this feature.

You don’t have to keep the Library panel visible at all times.

Click the small + button on the edge of the selected element (or the Insert element icon in the selected element menu), or press the + key, to bring up the floating Library panel.

The selected h1 Pines are special on the page with its element toolbar above it and two small plus buttons on its bottom edge; the pointer is on the lower one, which shows the tooltip Insert after this element, and a callout points at it.
Open Quick insert tool.

Shortcut Press + to display the floating Quick insert library for the selected element. Use ESC to close the floating Library.

The quick insert menu opened from the plus button below the selected h1: a search field, the placement Insert after h1, Lorem Ipsum text, the Plain HTML element groups from Layout to Head elements, and Options, with callouts on the placement and on the element groups.
Choose placement and click on any Library element to insert it into the selected element.

In addition to dragging elements to the page or to the tree, you can also just click on a library element to insert it into the selected element.

Use position icons to chose the placement of the new element in relation to the selected element.

Quick insert into the tree

Open the Tree panel.

Hovering the mouse pointer over the borders between elements in the Tree panel will display an insertion line at that position. Click when the insertion line is displayed to open a floating Quick insert library.

A thin green insertion line in the Tree panel between the p.lead and div.hero-actions rows, with a callout on the line.
Hover the mouse over element borders to display the insertion line.

Click on an element in the Library to insert it at the indicated position.

The quick insert library titled Insert before div.hero-actions, opened from the insertion line in the tree, with Layout, Content and Media elements.
Quick insert into the tree.

Shortcut Press ESC to close the floating Library.

Using Repeater to add multiple copies of the element

All operations that insert new elements to the page work with Repeater. Just type the desired number before the operation or during a Drag & drop move and Pinegrow will add that many copies of the element to the page.

Page toolbar showing a repeat count of x 10 on the "Pine Tree Poems" title box, with a callout reading "Type 0 or click to clear".
The Repeater.

Type a number before the operation with 0 to 9 keys to set how many copies of the element you want to insert.

Smart Drag & drop into the multiple selected elements

Selected element is required

You have to select one or more elements on the page to use this feature.

Let’s say we need to insert a new element into multiple elements on the page. For example, we need to add a button into each of the ten DIVs. With Pinegrow, we can do that with one move.

Select the elements with CMD or SHIFT click. When you insert a new element into one of the multiple selected elements…

Three selected numbers 120+, 4,850+ yrs and 0 km/h, with a button from the Insert Element window dragged over the first one, a green insert marker below it and the drag tip Hold CMD to target grid cells. Hold over text to insert into text.
Inserting a button into one of the selected elements.

…Pinegrow will analyze the situation and repeat the same operation on all selected elements.

The three selected numbers 120+, 4,850+ yrs and 0 km/h, each now followed by a Click me! button, after the button was inserted into all selected elements.
Buttons were inserted into all selected elements.