Dotclear

Changeset 3915:a57821ba9ef1 for plugins


Ignore:
Timestamp:
11/05/18 16:40:40 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Switching from inline JS variables to JSON script. A step ahead…

Location:
plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_post_config.php

    r3897 r3915  
    256256 
    257257    CKEDITOR.on('instanceReady',function(e) { 
    258         if (typeof dotclear_htmlFontSize !== 'undefined') { 
    259             e.editor.document.$.documentElement.style.setProperty('--html-font-size',dotclear_htmlFontSize); 
     258        if (dotclear && dotclear.data && dotclear.data.htmlFontSize) { 
     259            e.editor.document.$.documentElement.style.setProperty('--html-font-size',dotclear.data.htmlFontSize); 
    260260        } 
    261261 
  • plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php

    r3897 r3915  
    6060        dcPage::jsLoad($config_js); 
    6161 
    62         if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) { 
    63             $res .= 
    64             '<script type="text/javascript">' . "\n" . 
    65             dcPage::jsVar('dotclear_htmlFontSize', $GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) . "\n" . 
    66                 "</script>\n"; 
    67         } 
    68  
    6962        return $res; 
    7063    } 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r3874 r3915  
    139139            "</script>\n"; 
    140140 
    141         if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) { 
    142             $res .= 
    143             '<script type="text/javascript">' . "\n" . 
    144             dcPage::jsVar('dotclear_htmlFontSize', $GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) . "\n" . 
    145                 "</script>\n"; 
    146         } 
    147  
    148141        return $res; 
    149142    } 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js

    r3897 r3915  
    1 /*global jsToolBar, dotclear_htmlFontSize, chainHandler */ 
     1/*global jsToolBar, dotclear, chainHandler */ 
    22'use strict'; 
    33 
     
    184184    } 
    185185 
    186     if (typeof dotclear_htmlFontSize !== 'undefined') { 
    187       doc.documentElement.style.setProperty('--html-font-size', dotclear_htmlFontSize); 
     186    if (dotclear && dotclear.data && dotclear.data.htmlFontSize) { 
     187      doc.documentElement.style.setProperty('--html-font-size', dotclear.data.htmlFontSize); 
    188188    } 
    189189 
Note: See TracChangeset for help on using the changeset viewer.

Sites map