1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-10 21:21:03 +02:00

TinyMce Fullscreen now working correctly. Clearfix added to 'Alignment' format menu.

This commit is contained in:
Cameron
2016-03-09 16:06:30 -08:00
parent eb6c6c3021
commit aea0fd2e53
8 changed files with 37 additions and 12 deletions

View File

@ -17,7 +17,9 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
{
if(e_PAGE != 'image.php')
{
e107::js('footer', "https://tinymce.cachefly.net/4.3/tinymce.min.js");
// e107::js('footer', "https://tinymce.cachefly.net/4.3/tinymce.min.js");
e107::js('footer', '//cdn.tinymce.com/4/tinymce.min.js');
// e107::js('footer', "//cdn.tinymce.com/4/tinymce.min.js");
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);

View File

@ -16,7 +16,7 @@ if (!defined('e107_INIT')) { exit; }
e107::css('inline','
a.e-wysiwyg-toggle { margin-top:5px }
.mce-tinymce.mce-fullscreen { z-index: 1050; !important }
');

View File

@ -1 +1,3 @@
body { padding: 10px }
body { padding: 10px; }
div.clearfix:before { color:silver; content: "CLEAR FLOATS"; font-size:0.7em; padding-left:49%; padding-top:15px; }
div.clearfix { margin-bottom:10px; }

View File

@ -17,11 +17,12 @@
var t = this, dialect = ed.getParam('bbcode_dialect', 'e107').toLowerCase();
ed.on('beforeSetContent', function(e) {
e.content = t['_' + dialect + '_bbcode2html'](e.content, url);
});
// ed.contentCSS.push(url+'/e107.css');
ed.on('postProcess', function(e) {

View File

@ -3,7 +3,7 @@
<plugins>advlist autolink lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen
insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor emoticons </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 fontawesome smileys | preview</toolbar1>
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video fontawesome smileys | preview | fullscreen</toolbar1>
<external_plugins>e107 example compat3x</external_plugins>
<image_advtab>true</image_advtab>
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>

View File

@ -3,7 +3,7 @@
<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</toolbar1>
<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>
<image_advtab>true</image_advtab>
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>

View File

@ -420,6 +420,7 @@ class wysiwyg
{title: 'Paragraph', block: 'p'},
{title: 'Blockquote', block: 'blockquote'},
{title: 'Div', block: 'div'},
{title: 'Pre', block: 'pre'},
{title: 'Code Highlighted', block: 'pre', classes: 'prettyprint linenums' }
]},
@ -429,7 +430,8 @@ class wysiwyg
{title: 'Center', block: 'div',classes: 'text-center', icon: 'aligncenter'},
{title: 'Right', block: 'div', classes: 'text-right', icon: 'alignright'},
{title: 'Justify', block: 'div', classes: 'text-justify', icon: 'alignjustify'},
{title: 'No-Wrap', block: 'div', classes: 'text-nowrap', icon: ''},
{title: 'No Text-Wrap', block: 'div', classes: 'text-nowrap', icon: ''},
{title: 'Clear Float', block: 'div', classes: 'clearfix'},
{title: 'Image Left', selector: 'img', classes: 'pull-left', styles: {'margin': '0 10px 5px 0' }, icon: 'alignleft'},
{title: 'Image Right', selector: 'img', classes: 'pull-right', styles: { 'margin': '0 0 5px 10px'}, icon: 'alignright'}
@ -450,7 +452,6 @@ class wysiwyg
{title: 'Alert (Info)', block: 'div', classes: 'alert alert-info'},
{title: 'Alert (Warning)', block: 'div', classes: 'alert alert-warning'},
{title: 'Alert (Danger)', block: 'div', classes: 'alert alert-block alert-danger'},
{title: 'Float Clear', block: 'div', classes: 'clearfix'},
{title: 'Lead', block: 'p', classes: 'lead'},
{title: 'Well', block: 'div', classes: 'well'},
{title: 'Row', block: 'div', classes: 'row'},
@ -506,7 +507,16 @@ class wysiwyg
{title: 'Button (Danger)', value: 'btn btn-danger'}
]";
/* $ret['setup'] = "function(ed) {
ed.addMenuItem('test', {
text: 'Clear Floats',
context: 'insert',
icon: false,
onclick: function() {
ed.insertContent('<div class=\"clearfix\" ></div>');
}
});
}";*/
// https://github.com/valtlfelipe/TinyMCE-LocalAutoSave
@ -600,7 +610,17 @@ class wysiwyg
$ret['convert_fonts_to_spans'] = false;
$ret['content_css'] = e_PLUGIN_ABS.'tinymce4/editor.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css,http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css';
$editorCSS = array(
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css',
'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css',
e_PLUGIN_ABS.'tinymce4/editor.css',
);
$ret['content_css'] = json_encode($editorCSS);
$ret['content_style'] = "div.clearfix { border-top:1px solid red } ";
// $ret['content_css'] = e_WEB_ABS."js/bootstrap/css/bootstrap.min.css";

View File

@ -140,8 +140,8 @@ div.bbcode { margin: 15px 0px; clear: both; } /* layout control via bbcodes */
#comments-container { list-style: none outside none; margin:0px }
#comments-container > li { padding: 5px 0px }
.e-email::before { content: attr(data-user); }
.e-email::after { content: attr(data-dom) }
.e-email:before { content: attr(data-user); }
.e-email:after { content: attr(data-dom) }