---
url: /api/renderers/tinymce/src/functions/injectContentStylesheet.md
---
[pantoken-root](../../../../index.md) / [renderers/tinymce/src](../index.md) / injectContentStylesheet

# Function: injectContentStylesheet()

> **injectContentStylesheet**(`editor`, `url`, `file?`): `void`

Appends a `<link rel="stylesheet">` to the editor's content document `<head>` at runtime.
Idempotent per URL — calling this twice with the same `url` is a no-op the second time. Pass the
`file` the URL resolves so [retargetContentStylesheets](retargetContentStylesheets.md) can re-point it later; a tagged
link is idempotent per file instead, and a new URL for the same file updates it in place.

## Parameters

### editor

`Editor`

### url

`string`

### file?

[`CdnFile`](../../../../platforms/canvas-theme-editor/src/interfaces/CdnFile.md)

## Returns

`void`
