mirror of
https://github.com/e107inc/e107.git
synced 2025-08-31 10:01:56 +02:00
TinyMce styling corrected to work with newer version of TinyMce. TinyMce parser image path corrections. Old Tinymce popup code removed.
This commit is contained in:
@@ -42,7 +42,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce','tiny_mce_popup.js','jquery');
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
$('.e-dialog-close').click(function(){
|
||||
|
||||
top.tinymce.activeEditor.windowManager.close();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@@ -26,7 +26,7 @@ e107::css('inline',"
|
||||
|
||||
");
|
||||
|
||||
e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
|
||||
e107::js('inline',"
|
||||
|
||||
|
@@ -189,6 +189,9 @@ TEMPL;
|
||||
|
||||
if(check_class($pref['post_html'])) // Plain HTML mode.
|
||||
{
|
||||
|
||||
$content = trim($content);
|
||||
|
||||
$srch = array('src="'.e_HTTP.'thumb.php?','src="/{e_MEDIA_IMAGE}');
|
||||
$repl = array('src="{e_BASE}thumb.php?','src="{e_BASE}thumb.php?src=e_MEDIA_IMAGE/');
|
||||
$content = str_replace($srch, $repl, $content);
|
||||
@@ -261,6 +264,11 @@ TEMPL;
|
||||
);
|
||||
|
||||
}
|
||||
elseif(defined('TINYMCE_DEBUG'))
|
||||
{
|
||||
print_a("thumbUrlDecode: No Matches");
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
@@ -280,6 +288,11 @@ TEMPL;
|
||||
$srch = array("?","&");
|
||||
$repl = array("\?","&");
|
||||
|
||||
if(defined('TINYMCE_DEBUG'))
|
||||
{
|
||||
print_a($arr);
|
||||
}
|
||||
|
||||
foreach($arr['img'] as $img)
|
||||
{
|
||||
$regexp = '#(<img[^>]*src="'.str_replace($srch, $repl, $img['src']).'"[^>]*>)#';
|
||||
@@ -299,6 +312,7 @@ TEMPL;
|
||||
$qr['h'] = $img['height'];
|
||||
}
|
||||
|
||||
$qr['ebase'] = true;
|
||||
$src = e107::getParser()->thumbUrl($qr['src'],$qr);
|
||||
|
||||
$replacement = '<img src="'.$src.'" '.$style.$alt.$title.$class.$width.$height.' />';
|
||||
|
@@ -75,8 +75,8 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?image',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 680,
|
||||
id: 'media-manager'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -96,8 +96,8 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?video',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 650,
|
||||
id: 'media-manager'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -112,8 +112,9 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?glyph',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 650,
|
||||
id: 'media-manager'
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@@ -3,8 +3,8 @@
|
||||
<plugins>advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars code fullscreen
|
||||
insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins>
|
||||
<menubar>edit view format insert table tools</menubar>
|
||||
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video e107-bbcode smileys | preview | fullscreen</toolbar1>
|
||||
<external_plugins>e107 compat3x</external_plugins>
|
||||
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video e107-glyph smileys | preview | fullscreen</toolbar1>
|
||||
<external_plugins>e107</external_plugins>
|
||||
<image_advtab>true</image_advtab>
|
||||
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>
|
||||
<templates>[
|
||||
|
@@ -343,7 +343,10 @@ class wysiwyg
|
||||
|
||||
);
|
||||
|
||||
|
||||
// if(e_ADMIN_AREA)
|
||||
{
|
||||
// $ret['skin_url'] = e_PLUGIN_ABS.'tinymce4/skins/eskin';
|
||||
}
|
||||
|
||||
// Loop thru XML parms.
|
||||
foreach($config as $k=>$xml)
|
||||
@@ -387,11 +390,11 @@ class wysiwyg
|
||||
// plugins: "visualblocks",
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$formats = array(
|
||||
'hilitecolor' => array('inline'=> 'span', 'classes'=> 'hilitecolor', 'styles'=> array('backgroundColor'=> '%value'))
|
||||
// block : 'h1', attributes : {title : "Header"}, styles : {color : red}
|
||||
);
|
||||
);*/
|
||||
|
||||
//@see http://www.tinymce.com/wiki.php/Configuration:formats
|
||||
|
||||
|
Reference in New Issue
Block a user