Key takeaways
Render an AI-generated summary block inside a target element to give readers a quick overview of your article or long-form content.
The key takeaways placement renders an AI-generated summary of your page content inside a target element. It reads the article or long-form content on the page and produces a concise list of key points, giving readers a quick overview before they dive in. This placement is well suited for sidebars, article introductions, or any position near the top of your content where a summary adds value.
Mounting the placement
Pass Placement.KeyTakeaways and a target to mount(). The target is typically a CSS selector or an element ID.
window.InlineAI.mount(
window.InlineAI.Placement.KeyTakeaways,
{
selector: '.article-sidebar',
location: window.InlineAI.InjectionLocation.Prepend,
maxWidth: '400px',
}
);The call returns a placement ID you can pass to unmount() later.
Targeting the container
window.InlineAI.mount(window.InlineAI.Placement.KeyTakeaways, 'article-summary');Positioning and sizing
locationQueryInjectionLocationWhere to insert the placement relative to the target element:
window.InlineAI.InjectionLocation.Above: sibling before the targetwindow.InlineAI.InjectionLocation.Below: sibling after the targetwindow.InlineAI.InjectionLocation.Prepend: first child of the targetwindow.InlineAI.InjectionLocation.Append: last child of the target
widthQuerystringWidth of the placement container as a CSS value (e.g. "100%", "400px").
maxWidthQuerystringMaximum width of the placement container as a CSS value.
heightQuerystringHeight of the placement container as a CSS value.
maxHeightQuerystringMaximum height of the placement container as a CSS value.
breakpointsQueryBreakpointConfig[]Responsive breakpoints with minViewportWidth, maxViewportWidth, width, and height per entry.
Examples
window.InlineAI.mount(window.InlineAI.Placement.KeyTakeaways, 'article-summary');For unmounting, SPA routing, and command-queue usage, see the programmatic control guide.