Dotclear


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/dcCKEditor
Files:
3 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 
Note: See TracChangeset for help on using the changeset viewer.

Sites map