AntonLV 10 سال پیش
والد
کامیت
146a09761c

+ 2 - 0
modules/boonex/air/data/template/system/css/editor.less

@@ -0,0 +1,2 @@
+@import 'default.less';
+@import '../../../../../../../template/css/editor.less';

+ 2 - 0
modules/boonex/ocean/data/template/system/css/editor.less

@@ -0,0 +1,2 @@
+@import 'default.less';
+@import '../../../../../../../template/css/editor.less';

+ 2 - 0
modules/boonex/protean/data/template/system/css/editor.less

@@ -0,0 +1,2 @@
+@import 'default.less';
+@import '../../../../../../../template/css/editor.less';

+ 0 - 40
template/css/editor.css

@@ -1,40 +0,0 @@
-@import url(default.less);
-
-/* NOTE: copied from "fonts" section from default.css */
-
-body, td, pre {
-    font-family: Helvetica, Arial, sans-serif; 
-    font-weight: 400;
-	font-size: 18px;
-	font-size: 1.125rem;
-    color:#333;
-}
-
-h1 {
-	font-size: 38px;
-	font-size: 2.4rem;
-	font-weight: 700;
-}
-
-h2 {
-	font-size: 24px;
-	font-size: 1.5rem;
-	font-weight: 500;
-}
-
-h3 {
-	font-size: 18px;
-	font-size: 1.125rem;
-	font-weight: 500;
-}
-
-blockquote {
-    /* NOTE: copied from common.css */
-    border-left: 2px solid #ccc;
-    padding-left: 10px;
-}
-
-.bx-hide-in-htmleditor {
-    display:none;
-}
-

+ 27 - 0
template/css/editor.less

@@ -0,0 +1,27 @@
+@import 'default.less';
+
+body, td, pre {
+    .bx-def-font;
+}
+
+h1 {
+	.bx-def-font-h1;
+}
+
+h2 {
+	.bx-def-font-h2;
+}
+
+h3 {
+	.bx-def-font-h3;
+}
+
+blockquote {
+    /* NOTE: copied from common.css */
+    border-left: 2px solid #ccc;
+    padding-left: 10px;
+}
+
+.bx-hide-in-htmleditor {
+    display:none;
+}

+ 7 - 1
template/scripts/BxBaseEditorTinyMCE.php

@@ -168,12 +168,18 @@ class BxBaseEditorTinyMCE extends BxDolEditor
         // detect language
         // detect language
         $sLang = BxDolLanguages::getInstance()->detectLanguageFromArray (self::$CONF_LANGS);
         $sLang = BxDolLanguages::getInstance()->detectLanguageFromArray (self::$CONF_LANGS);
 
 
+        $sCss = 'editor.less';
+        $aCss = BxDolTemplate::getInstance()->_lessCss(array(
+        	'path' => $this->_oTemplate->getCssPath($sCss),
+        	'url' => $this->_oTemplate->getCssUrl($sCss)
+        ));
+
         // initialize editor
         // initialize editor
         $sInitEditor = $this->_replaceMarkers(self::$CONF_COMMON, array(
         $sInitEditor = $this->_replaceMarkers(self::$CONF_COMMON, array(
             'bx_var_custom_init' => $sToolsItems,
             'bx_var_custom_init' => $sToolsItems,
             'bx_var_custom_conf' => $this->_sConfCustom,
             'bx_var_custom_conf' => $this->_sConfCustom,
             'bx_var_plugins_path' => bx_js_string(BX_DOL_URL_PLUGINS, BX_ESCAPE_STR_APOS),
             'bx_var_plugins_path' => bx_js_string(BX_DOL_URL_PLUGINS, BX_ESCAPE_STR_APOS),
-            'bx_var_css_path' => bx_js_string($this->_oTemplate->getCssUrl('editor.css'), BX_ESCAPE_STR_APOS),
+            'bx_var_css_path' => bx_js_string($aCss['url'], BX_ESCAPE_STR_APOS),
             'bx_var_skin' => bx_js_string($this->_aObject['skin'], BX_ESCAPE_STR_APOS),
             'bx_var_skin' => bx_js_string($this->_aObject['skin'], BX_ESCAPE_STR_APOS),
             'bx_var_lang' => bx_js_string($sLang, BX_ESCAPE_STR_APOS),
             'bx_var_lang' => bx_js_string($sLang, BX_ESCAPE_STR_APOS),
             'bx_var_selector' => bx_js_string($sSelector, BX_ESCAPE_STR_APOS),
             'bx_var_selector' => bx_js_string($sSelector, BX_ESCAPE_STR_APOS),