Commit 76baa3f0 authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

upgrading to TinyMCE 5

parent 949f3bd4
......@@ -284,7 +284,7 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
<div id="content"><?php echo $entry['content']; ?></div>
<script src=""></script>
<script src=""></script>
document.getElementById('preview').style.display = 'block';
function update_datetime () {
......@@ -303,7 +303,7 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
selector: '#content',
inline: true,
menubar: false,
plugins: [ 'save', 'autosave', 'lists', 'link', 'textcolor', 'colorpicker', 'image', 'media' ],
plugins: [ 'save', 'autosave', 'lists', 'link', 'image', 'media' ],
block_formats: 'Paragraph=p;Title=h3;Subtitle=h4;Teletype=pre',
toolbar: 'save | undo redo | formatselect bold italic underline strikethrough inlinecode forecolor backcolor removeformat | bullist numlist | alignleft aligncenter alignright alignjustify | link image media',
setup: function (tmce) {
......@@ -311,7 +311,7 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
document.getElementById('warning').innerHTML = 'You have unsaved modifications!';
document.getElementById('entry_content').value = tmce.getContent();
tmce.addButton('inlinecode', { icon: 'code', onclick: function () {
tmce.ui.registry.addToggleButton('inlinecode', { icon: 'code', onAction: function () {
tmce.execCommand('mceToggleFormat', false, 'code');
}, onpostrender: function () {
var btn = this; tmce.on('init', function () {
......@@ -337,13 +337,13 @@ function render ($file, $mode='edit', $entry_dt='NEW') {
<p><textarea name="page_content" id="page_content" width="100%" rows="10" class="page"><?php echo $page['content']; ?></textarea></p>
<p><button type="submit">Save</button></p>
<script src=""></script>
<script src=""></script>
document.getElementById('page_form').style.display = 'none';
selector: '#content',
inline: true,
plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'hr', 'anchor', 'autosave', 'save', 'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code', 'fullscreen', 'insertdatetime', 'media', 'nonbreaking', 'table', 'contextmenu', 'template', 'emoticons', 'paste', 'textcolor', 'colorpicker', 'textpattern', 'codesample' ],
plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'hr', 'anchor', 'autosave', 'save', 'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code', 'fullscreen', 'insertdatetime', 'media', 'nonbreaking', 'table', 'contextmenu', 'template', 'emoticons', 'paste', 'textpattern', 'codesample' ],
toolbar1: 'save | undo redo | styleselect | bold italic forecolor backcolor removeformat',
toolbar2: 'alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media',
style_formats: [
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment