PHP Classes

File: public/js/tinymce/src/plugins/codesample/src/main/js/core/LoadCss.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/codesample/src/main/js/core/LoadCss.js   Download  
File: public/js/tinymce/src/plugins/codesample/src/main/js/core/LoadCss.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,126 bytes
 

Contents

Class file image Download
/** * LoadCss.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.codesample.core.LoadCss', [ 'tinymce.plugins.codesample.api.Settings' ], function (Settings) { // Todo: use a proper css loader here var loadCss = function (editor, pluginUrl, addedInlineCss, addedCss) { var linkElm, contentCss = Settings.getContentCss(editor); if (editor.inline && addedInlineCss.get()) { return; } if (!editor.inline && addedCss.get()) { return; } if (editor.inline) { addedInlineCss.set(true); } else { addedCss.set(true); } if (contentCss !== false) { linkElm = editor.dom.create('link', { rel: 'stylesheet', href: contentCss ? contentCss : pluginUrl + '/css/prism.css' }); editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); } }; return { loadCss: loadCss }; } );