PHP Classes

File: engine/modules/core/wysiwyg/wysiwyg.hook.inc

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/core/wysiwyg/wysiwyg.hook.inc   Download  
File: engine/modules/core/wysiwyg/wysiwyg.hook.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 410 bytes
 

Contents

Class file image Download
<?php

/**
 * Implements hook_page_init().
 *
 * @param Environment $env
 * The Environment.
 * @param array $vars
 * An array of variables.
 */
function wysiwyg_page_init($env, $vars) {
 
/** @var Page $page */
 
$page = $vars['page'];

  if (
Shadow::isOpen($env)) {
   
// Include the codemirror lib.
   
$page->addCSS('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css');
  }
}