Browse Source

Add a button to temporary disable the editor because of fucking my head too much already.

master
Sándor 5 years ago
parent
commit
311d9a3d19
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      plugins/ckeditor_simple/_plugin.php

+ 7
- 3
plugins/ckeditor_simple/_plugin.php View File

@ -1,5 +1,9 @@
<?php
addHead('<script src="/plugins/ckeditor/ckeditor.js"></script>', 'ckeditor');
addHead('<script src="/plugins/ckeditor/adapters/jquery.js"></script>', 'ckeditor-adapter');
addHead('<script>$(document).ready(function() { $("#entry-textarea").ckeditor(); });</script>');
if (!isset($_GET['nocke'])) :
addHead('<script src="/plugins/ckeditor/ckeditor.js"></script>', 'ckeditor');
addHead('<script src="/plugins/ckeditor/adapters/jquery.js"></script>', 'ckeditor-adapter');
addHead('<script>$(document).ready(function() { $("#entry-textarea").after(\'<button type="button" onclick="window.location.href=this.dataset.url" data-url="'.get_current_link().'?nocke">CKE -</button>\'); $("#entry-textarea").ckeditor(); });</script>');
else :
addHead('<script>$(document).ready(function() { $("#entry-textarea").after(\'<button type="button" onclick="window.location.href=this.dataset.url" data-url="'.get_current_link().'">CKE +</button>\'); });</script>');
endif;

Loading…
Cancel
Save