Dotclear

Changeset 3669:41c8e8a58e1f for plugins


Ignore:
Timestamp:
01/19/18 16:54:20 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Adjust editors base font size (CodeMirror?, dcLegacyEditor, dcCKEditor), should fix #2263

Location:
plugins
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_post_config.php

    r3641 r3669  
    251251               } 
    252252          } 
     253 
     254          if (typeof dotclear_htmlFontSize !== 'undefined') { 
     255               e.editor.document.$.documentElement.style.setProperty('--html-font-size',dotclear_htmlFontSize); 
     256          } 
    253257     }); 
    254258 
  • plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php

    r3421 r3669  
    3232        } 
    3333 
    34         return 
     34        $res = 
    3535            '<script type="text/javascript">'."\n". 
    3636            dcPage::jsVar('dotclear.ckeditor_context', $context). 
     
    5858            dcPage::jsLoad(self::$p_url.'/js/ckeditor/adapters/jquery.js'). 
    5959            dcPage::jsLoad($config_js); 
     60 
     61          if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) { 
     62               $res .= 
     63               '<script type="text/javascript">'."\n". 
     64               dcPage::jsVar('dotclear_htmlFontSize',$GLOBALS['core']->auth->user_prefs->interface->htmlfontsize)."\n". 
     65               "</script>\n"; 
     66          } 
     67 
     68          return $res; 
    6069     } 
    6170 
  • plugins/dcCKEditor/js/ckeditor/contents.css

    r3616 r3669  
    2727     word-wrap: break-word; 
    2828} 
     29 
     30/* Dotclear */ 
     31:root { 
     32     --html-font-size: 62.5%; } 
     33 
     34html { 
     35     font-size: 62.5%; 
     36     font-size: var(--html-font-size); } 
     37 
     38body { 
     39     font-size: 1.4rem; 
     40     line-height: 1.5; 
     41     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 
     42} 
     43.cke_editable 
     44{ 
     45     font-size: 1.4rem; 
     46} 
     47/* End Dotclear */ 
    2948 
    3049blockquote 
  • plugins/dcLegacyEditor/css/jsToolBar/jsToolBar.css

    r3602 r3669  
    168168/* WYSIWYG Document */ 
    169169body.wysiwygDoc { 
    170      font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif; 
    171170     color : #000; 
    172171     background: #f9f9f9; 
     
    174173     padding : 2px; 
    175174     border: none; 
    176 } 
    177 .wysiwygDoc pre, .wysiwygDoc code, .wysiwygDoc kbd, .wysiwygDoc samp { 
    178      font-family:"Courier New",Courier,monospace; 
    179      font-size : 1.1em; 
    180175} 
    181176.wysiwygDoc code { 
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r3421 r3669  
    6969          "jsToolBar.prototype.iframe_css = '". 
    7070          'body {'. 
    71           '    font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'. 
    7271          '    color: #000;'. 
    7372          '    background: #f9f9f9;'. 
     
    7675          '    border: none;'. 
    7776          (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? '     direction: rtl;' : ''). 
    78           '}'. 
    79           'pre, code, kbd, samp {'. 
    80           '    font-family: "Courier New",Courier,monospace;'. 
    81           '    font-size: 1.1em;'. 
    8277          '}'. 
    8378          'code {'. 
     
    140135          "</script>\n"; 
    141136 
     137          if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) { 
     138               $res .= 
     139               '<script type="text/javascript">'."\n". 
     140               dcPage::jsVar('dotclear_htmlFontSize',$GLOBALS['core']->auth->user_prefs->interface->htmlfontsize)."\n". 
     141               "</script>\n"; 
     142          } 
     143 
    142144          return $res; 
    143145     } 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js

    r3258 r3669  
    165165          '<html>\n'+ 
    166166          '<head>\n'+ 
     167          '<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />' 
    167168          '<style type="text/css">'+This.iframe_css+'</style>\n'+ 
    168169          (This.base_url != '' ? '<base href="'+This.base_url+'" />' : '')+ 
     
    177178               doc.designMode = 'on'; 
    178179               // warning : doc is now inaccessible for IE6 sp1 
     180          } 
     181 
     182          if (typeof dotclear_htmlFontSize !== 'undefined') { 
     183               doc.documentElement.style.setProperty('--html-font-size',dotclear_htmlFontSize); 
    179184          } 
    180185 
Note: See TracChangeset for help on using the changeset viewer.

Sites map