Media fragment

Key point: A fragment containing non-PSML content.

The configuration of default PageSeeder fragments includes tools able to understand and edit PSML structure, content and metadata.

While this supports the requirements for creating text content, many documents also require support for content such as equations, graphics or rich media. For this, PageSeeder has the “media fragment”, which enables documents to include content like the following:

  • Text-based, non-PSML content, such as AsciiMath or Mermaid diagrams
  • XML-format but not the PSML syntax such MathML, or SVG,
  • Rich media that has its own set of tools such as YouTube or Vimeo videos.

How it differs from the default fragment is the media fragment requires setup of the document template according to the media type of the contents. This tells PageSeeder which editor to invoke, and how to process the fragment content.

After configuration in the template, media fragments are available an option from the drop-down menu whenever users add a new fragment.

If the fragment content is a text or XML format that a standard browser can edit, any user with permission can edit the media fragment content.

For developers

The PSML element <media-fragment> must include a @mediatype attribute specifying the content.

For more information, see the media-fragment element on the PageSeeder developer’s website.