1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Load TinyMce editor CSS from library.

This commit is contained in:
Cameron
2017-01-27 14:18:12 -08:00
parent ad7efe78a9
commit 67df2db265
2 changed files with 26 additions and 26 deletions

View File

@@ -2764,6 +2764,17 @@ class e_parse extends e_parser
*/ */
public function replaceConstants($text, $mode = '', $all = FALSE) public function replaceConstants($text, $mode = '', $all = FALSE)
{ {
if(is_array($text))
{
$new = array();
foreach($text as $k=>$v)
{
$new[$k] = $this->replaceConstants($v,$mode,$all);
}
return $new;
}
if($mode != "") if($mode != "")
{ {

View File

@@ -724,24 +724,29 @@ class wysiwyg
// $ret['skin'] = 'e107admin'; // $ret['skin'] = 'e107admin';
// $ret['skin_url'] = SITEURLBASE.e_PLUGIN_ABS.'tinymce4/skins/e107admin'; // $ret['skin_url'] = SITEURLBASE.e_PLUGIN_ABS.'tinymce4/skins/e107admin';
$ret['convert_fonts_to_spans'] = false; $ret['convert_fonts_to_spans'] = false;
/*
$editorCSS = array( $editorCSS = array(
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css',
'http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', 'http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css',
e_PLUGIN_ABS.'tinymce4/editor.css', e_PLUGIN_ABS.'tinymce4/editor.css',
); );
*/
$editorCSS = array(
0 => e107::getLibrary()->getProperty('bootstrap','library_path').'dist/css/bootstrap.min.css',
1 => e107::getLibrary()->getProperty('fontawesome','library_path').'css/font-awesome.min.css',
2 => e_PLUGIN_ABS.'tinymce4/editor.css'
);
$editorCSS = $tp->replaceConstants($editorCSS, 'abs');
$ret['content_css'] = json_encode($editorCSS); $ret['content_css'] = json_encode($editorCSS);
$ret['content_style'] = "div.clearfix { border-top:1px solid red } "; $ret['content_style'] = "div.clearfix { border-top:1px solid red } ";
$ret['relative_urls'] = false; //Media Manager prefers it like this.
// $ret['content_css'] = e_WEB_ABS."js/bootstrap/css/bootstrap.min.css";
$ret['relative_urls'] = false; //Media Manager prefers it like this.
$ret['preformatted'] = true; $ret['preformatted'] = true;
$ret['document_base_url'] = SITEURL; $ret['document_base_url'] = SITEURL;
$ret['schema'] = "html5"; $ret['schema'] = "html5";
@@ -787,23 +792,7 @@ class wysiwyg
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
/*
$cssFiles = $fl->get_files(THEME,"\.css",'',2);
foreach($cssFiles as $val)
{
$css[] = str_replace(THEME,THEME_ABS,$val['path'].$val['fname']);
}
// @todo e107::library('info','bootstrap','library_path'); or similar ?
$css[] = "{e_WEB_ABS}js/bootstrap/css/bootstrap.min.css";
$content_css = vartrue($config['content_css'], implode(",",$css));
$content_styles = array('Bootstrap Button' => 'btn btn-primary', 'Bootstrap Table' => 'table');
@@ -833,7 +822,7 @@ class wysiwyg
// 'end_container_on_empty_block' => true, // 'end_container_on_empty_block' => true,
// HTML5 formats // HTML5 formats
/*
'style_formats' => "[ 'style_formats' => "[
{title : 'h1', block : 'h1'}, {title : 'h1', block : 'h1'},
{title : 'h2', block : 'h2'}, {title : 'h2', block : 'h2'},
@@ -851,7 +840,7 @@ class wysiwyg
{title : 'aside', block : 'aside', wrapper: true}, {title : 'aside', block : 'aside', wrapper: true},
{title : 'figure', block : 'figure', wrapper: true} {title : 'figure', block : 'figure', wrapper: true}
]", ]",
*/
// -------------------------------- // --------------------------------
@@ -921,7 +910,7 @@ class wysiwyg
if(ADMIN) if(ADMIN)
{ {
// $this->config['external_link_list_url'] = e_PLUGIN_ABS."tiny_mce/filelist.php"; // $this->config['external_link_list_url'] = e_PLUGIN_ABS."tiny_mce/filelist.php";
} }*/
} }