GHSFullPageConfig
interface
The configuration of the Full page editing feature.
Properties
allowRenderStylesFromHead : boolean | undefinedmodule:html-support/generalhtmlsupportconfig~GHSFullPageConfig#allowRenderStylesFromHeadWhether the feature should allow the editor to render styles from the
<head>section of editor data content.When set to
true, the editor will render styles from the<head>section of editor data content.ClassicEditor .create( { htmlSupport: { fullPage: { allowRenderStylesFromHead: true } } } ) .then( ... ) .catch( ... );Copy codeDefaults to
falsesanitizeCss : ( css: string ) => GHSCssSanitizeOutput | undefinedmodule:html-support/generalhtmlsupportconfig~GHSFullPageConfig#sanitizeCssCallback used to sanitize the CSS provided by the user in editor content when option
htmlSupport.fullPage.allowRenderStylesFromHeadis set totrue.We strongly recommend overwriting the default function to avoid XSS vulnerabilities.
The function receives the CSS (as a string), and should return an object that matches the
GHSCssSanitizeOutputinterface.ClassicEditor .create( editorElement, { htmlSupport: { fullPage: { allowRenderStylesFromHead: true, sanitizeCss( CssString ) { const sanitizedCss = sanitize( CssString ); return { css: sanitizedCss, // true or false depending on whether the sanitizer stripped anything. hasChanged: ... }; } } } } ) .then( ... ) .catch( ... );Copy code