Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/designer-extension-typings/elements-generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

type InsertOrMoveElement = <
el extends AnyElement,
target extends el | ElementPreset<el> | Component | BuilderElement,
target extends el | ElementPreset<el> | Component | BuilderElement | string,
>(
this: {id: FullElementId},
that: target
Expand Down
2 changes: 1 addition & 1 deletion src/examples/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const Components = {

if (root.children) {
// Append DIV block to Root element
await root?.append(webflow.elementPresets.DivBlock)
await root?.append('div')
}
},

Expand Down
8 changes: 4 additions & 4 deletions src/examples/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export const Elements = {
if (selectedElement) {
// Insert DIV before selected Element
const newDiv = await selectedElement.before(
webflow.elementPresets.DivBlock,
'div',
)

// Print element details
Expand All @@ -322,7 +322,7 @@ export const Elements = {
if (selectedElement) {
// Insert DIV after selected Element
const newDiv = await selectedElement.after(
webflow.elementPresets.DivBlock,
'div',
)

// Print element details
Expand All @@ -337,7 +337,7 @@ export const Elements = {
// Check if element supports child elements
if (el?.children) {
// Append newElement as a child to of the selected element
const newElement = await el?.append(webflow.elementPresets.DivBlock)
const newElement = await el?.append('div')

// Print element Details
console.log(JSON.stringify(newElement))
Expand All @@ -351,7 +351,7 @@ export const Elements = {
// Check if element supports child elements
if (el?.children) {
// Prepend newElement as a child to of the selected element
const newElement = await el?.prepend(webflow.elementPresets.DivBlock)
const newElement = await el?.prepend('div')

// Print element Details
console.log(JSON.stringify(newElement))
Expand Down