diff --git a/e107_plugins/tinymce4/snippets/bootstrap_row48.htm b/e107_plugins/tinymce4/snippets/bootstrap_row48.htm new file mode 100644 index 000000000..9d395b6e7 --- /dev/null +++ b/e107_plugins/tinymce4/snippets/bootstrap_row48.htm @@ -0,0 +1,8 @@ + +
+
col-md-4
+
col-md-8
+
\ No newline at end of file diff --git a/e107_plugins/tinymce4/snippets/bootstrap_table.htm b/e107_plugins/tinymce4/snippets/bootstrap_table.htm index 6a13b2a1a..20bbb1d32 100644 --- a/e107_plugins/tinymce4/snippets/bootstrap_table.htm +++ b/e107_plugins/tinymce4/snippets/bootstrap_table.htm @@ -1,4 +1,7 @@ - +
diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index 12310fcc0..020718af7 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -600,12 +600,15 @@ class wysiwyg $ret['convert_fonts_to_spans'] = false; - $ret['content_css'] = e_PLUGIN_ABS.'tinymce4/editor.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css,http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'; - + $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'; + + // $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['document_base_url'] = SITEURL; - + $ret['schema'] = "html5"; + $ret['element_format'] = "html"; // $ret['table_default_attributes'] = json_encode(array('class'=>'table table-striped' )); @@ -614,6 +617,16 @@ class wysiwyg { $ret['templates'] = $tp->replaceConstants($ret['templates'],'abs'); // $this->getTemplates(); } + + if(ADMIN) + { + $ret['templates'] = $this->getSnippets(); + } + + + + + // $this->config['verify_css_classes'] = 'false'; $text = array(); @@ -780,6 +793,28 @@ class wysiwyg } + private function getSnippets() + { + $files = e107::getFile()->get_files(e_PLUGIN."tinymce4/snippets"); + + $ret = array(); + foreach($files as $f) + { + $content = file_get_contents($f['path'].$f['fname'], null, null, null, 140); + + preg_match('/