mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 04:24:43 -04:00
22 lines
646 B
TypeScript
22 lines
646 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { MarkdownExtension } from '../markdown-extension'
|
|
import type { ComponentReplacer } from '../../replace-components/component-replacer'
|
|
import { IframeCapsuleReplacer } from './iframe-capsule-replacer'
|
|
|
|
/**
|
|
* Adds a replacer that capsules iframes in a click shield.
|
|
*/
|
|
export class IframeCapsuleMarkdownExtension extends MarkdownExtension {
|
|
public buildReplacers(): ComponentReplacer[] {
|
|
return [new IframeCapsuleReplacer()]
|
|
}
|
|
|
|
public buildTagNameAllowList(): string[] {
|
|
return ['iframe']
|
|
}
|
|
}
|