Skip to content

microsoft/power-platform-skills / plugins/power-pages/skills/author-webpage-content

author-webpage-content

Verified

Generates and fills the localized HTML body of an existing webpage in a PAC CLI-downloaded non-SPA Power Pages site from a resolved page-content specification. Use whenever a caller has resolved the existing webpage metadata and asks to compose, replace, append, or modify the exact localized `.webpage.copy.html` file with Design Studio-compatible sections, columns, flex containers, text, images, buttons, videos, iframes, Generative AI Search components, basic forms, lists, multistep forms, or spacers. This skill owns only HTML generation and the supplied target file; the coordinator's webpage reference workflow owns discovery, records, metadata, languages, routes, templates, navigation, and companion-file creation. Do not use for React, Angular, Vue, or Astro SPA sites.

references/design-studio-video-component.md

View on GitHub
# Design Studio Video Component

Canonical reference for skills that add or edit a video on a Power Pages Design Studio page
in a PAC CLI-downloaded non-SPA site. This reference applies to localized webpage
content under `web-pages/`.

First follow `${PLUGIN_ROOT}/skills/author-webpage-content/references/design-studio-component-authoring.md`: derive the
page, locale, target video or insertion point, source type and URL, accessible title,
sizing, alignment, and playback options from the user's prompt and existing markup; use
engineering judgment for safe mechanical details; ask only about material ambiguity.
This reference supplies video-specific markup, edit boundaries, safety, preservation,
and verification rules.

Microsoft Learn documents source selection, alignment, start time, player controls,
autoplay, loop, and resizing. The source picker shown in the supplied Design Studio
sample offers YouTube, Microsoft Clipchamp, and Video URL. The exact HTML below comes
from PAC-downloaded Design Studio samples; Microsoft Learn does not specify the
serialized markup.

## Target file contract

Edit only the selected localized content file:

```text
web-pages/<page-directory>/content-pages/<Page>.<locale>.webpage.copy.html
```

Do not substitute the page-level `<Page>.webpage.copy.html`. The calling skill is
responsible for selecting the page and language and obtaining approval for the exact
insertion point.

When the video needs a new section, use the approved layout from:

```text
${PLUGIN_ROOT}/skills/author-webpage-content/references/design-studio-section-layouts.md
```

Replace the selected layout's `<!-- COMPONENT_HTML -->` marker with only the approved
video markup. When inserting into an existing section, preserve its structure and add
only the video component to the selected `.columnBlockLayout`.

## Observed component forms

### YouTube embed

The supplied PAC sample serializes a YouTube source as an iframe:

```html
<iframe allowfullscreen="allowfullscreen" src="https://www.youtube.com/embed/L-2pdQlptqk" controls="controls" referrerpolicy="strict-origin-when-cross-origin" data-componentname="Video" style="max-width: 100%; width: 100%; height: 450px;" title="Video title"> </iframe>
```

- Use the YouTube embed URL form: `https://www.youtube.com/embed/<VIDEO_ID>`.
- Do not put a normal `watch?v=` or `youtu.be` page URL directly in `src`.
- Keep `data-componentname="Video"` and the observed `referrerpolicy`.
- Keep `allowfullscreen="allowfullscreen"` only when fullscreen playback is intended.
- Supply a concise, localized `title` describing the iframe. The supplied PAC markup
  omitted it, but a meaningful iframe title is required for accessibility.
- Preserve the non-self-closing iframe form.

Validate the video ID rather than accepting arbitrary text in the embed URL. Do not
generate an iframe for an unapproved host.

### Direct video URL

The supplied empty Video URL component serializes as:

```html
<video allowfullscreen="allowfullscreen" src="" controls="" style="max-width: 100%; width: 100%; height: 450px;"></video>
```

An empty `src` is only a placeholder and does not play a video. For a completed
component, use an approved direct video resource:

```html
<video src="https://cdn.example.com/videos/introduction.mp4" controls="" style="max-width: 100%; width: 100%; height: 450px;"></video>
```

- Require an absolute HTTPS URL or a verified site-root-relative PAC web-file path.
- Confirm the URL resolves to playable video media, not an ordinary webpage.
- Keep `controls` unless the user explicitly disables player controls.
- Do not add a `name` attribute; it was not present in the supplied native-video markup.
- Preserve `allowfullscreen` when reproducing Design Studio output, even though it is
  primarily meaningful for iframe embeds.

If a local video is selected, verify its binary and adjacent `.webfile.yml` under
`<PROJECT_ROOT>/web-files/`, and confirm `adx_partialurl` matches the root-relative
`src`.

### Microsoft Clipchamp

The source picker includes Microsoft Clipchamp, but neither the supplied PAC markup nor
Microsoft Learn documents its exported HTML shape. Do not guess whether a Clipchamp URL
should use `<iframe>`, `<video>`, or a transformed embed URL.

Before implementing a Clipchamp source, obtain a PAC-downloaded
`.webpage.copy.html` example generated by Design Studio and preserve its exact element,
URL transformation, attributes, and privacy policy.

## Section layout examples

The video component works in any of the five shared OOB layouts:

- one column (`12`);
- two equal columns (`6+6`);
- three equal columns (`4+4+4`);
- one-third left (`4+8`);
- one-third right (`8+4`).

For example, the supplied native-video placeholder in the right, narrower column of an
`8+4` section is:

```html
<div class="row sectionBlockLayout text-start" style="display: flex; flex-wrap: wrap; padding: 8px; margin: 0px; min-height: auto;">
  <div class="container" style="padding: 0px; display: flex; flex-wrap: wrap;">
    <div class="col-lg-8 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 250px;"></div>
    <div class="col-lg-4 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 250px;"><video allowfullscreen="allowfullscreen" src="" controls="" style="max-width: 100%; width: 100%; height: 450px;"></video></div>
  </div>
</div>
```

For a different layout or target column, use the shared section template rather than
manually changing widths.

## Sizing and alignment

The supplied PAC samples use:

```css
max-width: 100%; width: 100%; height: 450px;
```

- Use positive finite dimensions.
- Keep `max-width: 100%` to prevent horizontal overflow.
- Reuse observed alignment styles from the target site rather than inventing
  platform-specific classes.
- Do not add borders, shadows, or other decoration unless requested.
- Verify the video remains usable at narrow viewport widths. A fixed `height` may need
  an approved responsive treatment if it causes poor mobile presentation.

## Playback options

Microsoft Learn supports start time, player controls, autoplay, and loop. These options
serialize differently for iframe providers and native `<video>` elements.

- **Controls:** Native video uses the boolean `controls` attribute. Provider embeds can
  encode controls in the embed URL instead.
- **Autoplay:** Never enable it implicitly. Browsers commonly block autoplay with sound;
  autoplaying media can also create an accessibility problem.
- **Loop:** Add only when explicitly requested.
- **Start time:** Do not guess provider-specific query parameters or media fragments.

For any requested option not demonstrated in the target site's existing PAC markup,
generate a sample in Design Studio first and preserve that serialization.

## Source and embedding safety

- Require HTTPS for remote video and iframe sources.
- Reject `javascript:`, `data:`, `vbscript:`, `file:`, protocol-relative, and unknown
  schemes.
- For iframe sources, allow only the provider host selected by the user.
- Do not accept raw user-supplied `<iframe>` markup.
- Preserve `referrerpolicy="strict-origin-when-cross-origin"` for the observed YouTube
  form.
- Do not add permissive `sandbox` or `allow` values without a verified provider need.
- Warn that providers can block external embedding; Microsoft documents that such videos
  may not display on the page.
- Do not place secrets, access tokens, or private sharing keys in committed URLs.

## Accessibility

- Give every video iframe a meaningful, localized `title`.
- Provide captions for prerecorded video with meaningful audio.
- Provide audio description or an equivalent transcript when visual content conveys
  information not available in the audio.
- Avoid autoplay. If explicitly required, ensure the implementation provides an
  immediate pause mechanism and follows browser muting requirements.
- Keep keyboard-accessible native or provider controls.
- Do not hide controls unless an accessible custom control surface exists.

## Editing an existing video

The calling skill must identify one existing `<iframe data-componentname="Video">` or
`<video>` element before editing it. Report each candidate's section, column, element
type, source, title, dimensions, playback attributes, and nearby content. If multiple
videos could match, require explicit selection; do not replace a repeated URL globally.

For edits that keep the same source type, change only the approved properties:

- source URL or YouTube video ID;
- localized iframe `title`;
- width, height, max-width, and alignment;
- controls, autoplay, loop, fullscreen, and verified start-time representation.

Preserve the element type, `data-componentname`, referrer policy, unrelated attributes,
surrounding section/column markup, and sibling components.

Changing source types can require replacing the whole component element:

- YouTube or another verified embed provider uses the observed iframe form;
- a direct playable media URL uses the native `<video>` form;
- Clipchamp remains blocked until its PAC serialization is available.

For a source-type conversion, show the full old and new element before approval and
replace only the selected component boundary. Reapply approved playback options using
the verified representation for the new type; do not copy iframe-only attributes or URL
parameters blindly onto `<video>`, or native boolean attributes blindly onto an iframe.

When changing a source, clear stale provider-specific query parameters, reassess the
accessible title, and preserve captions/transcript support. An empty `src` can be edited
into a completed component, but a completed source must not be cleared unless the user
explicitly requests a placeholder.

## Preserve the existing page

- Read the complete target `.webpage.copy.html` before editing.
- Make the smallest possible insertion.
- Preserve existing Liquid, sections, columns, classes, `data-*` attributes, inline
  styles, indentation, and line endings.
- Do not reformat unrelated markup.
- Insert the video only at the exact approved position.
- Apply localized titles and supporting text only to the selected locale.

## Verification checklist

After editing:

1. Re-read the complete localized `.webpage.copy.html` file.
2. Confirm all previous content remains.
3. Confirm the iframe or video is inside the approved `.columnBlockLayout`.
4. Confirm `src` is nonempty and uses the approved HTTPS provider or verified local
   web-file path.
5. Confirm a YouTube URL uses the `/embed/<VIDEO_ID>` form.
6. Confirm the video title, controls, start time, autoplay, and loop match the approved
   choices.
7. Confirm sizing does not overflow its column.
8. Confirm no guessed Clipchamp serialization was introduced.
9. For an edit, confirm exactly one selected video boundary changed and provider-specific
   attributes match the final element type.
10. Confirm no other locale or page-level copy changed.
11. Review the local diff before any `pac pages upload`.

Editing the downloaded file changes only the local copy. A skill using this reference
must not upload or deploy unless the user separately requests and approves that action.

## Microsoft documentation

- [Add a video](https://learn.microsoft.com/power-pages/getting-started/add-video)
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall