Skip to content

pantoken-root / renderers/tinymce/src / 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 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

Returns ​

void