diff --git a/bl-plugins/tinymce/css/bludit.css b/bl-plugins/tinymce/css/bludit.css
index 19646263..6fb93e2f 100644
--- a/bl-plugins/tinymce/css/bludit.css
+++ b/bl-plugins/tinymce/css/bludit.css
@@ -1,37 +1,12 @@
-body {
- padding: 10px 5% !important;
- font-size: 16px;
+.mce-tinymce,
+.mce-stack-layout,
+.mce-edit-area{
+ display: flex!important;
+ flex-direction: column;
+ flex: 1;
+ align-items:stretch;
}
-.mce-content-body img {
- max-width: 100%;
- height: auto;
+.mce-tinymce iframe{
+ flex: 1;
}
-
-.mce-content-body .mce-pagebreak {
- height: 5px !important;
-}
-
-.mce-content-body a {
- color: #4a90e2;
- text-decoration: none;
-}
-
-.mce-content-body p,
-.mce-content-body div,
-.mce-content-body h1,
-.mce-content-body h2,
-.mce-content-body h3,
-.mce-content-body h4,
-.mce-content-body h5,
-.mce-content-body h6,
-.mce-content-body ul {
- line-height: 1.5em;
-}
-
-.mce-content-body blockquote p {
- padding: 10px 20px;
- margin: 0 0 20px;
- border-left: 5px solid #eee;
- font-style: italic;
-}
\ No newline at end of file
diff --git a/bl-plugins/tinymce/css/tinymce.css b/bl-plugins/tinymce/css/tinymce.css
new file mode 100644
index 00000000..d8d9462d
--- /dev/null
+++ b/bl-plugins/tinymce/css/tinymce.css
@@ -0,0 +1,37 @@
+body.mce-content-body {
+ padding: 10px 5% !important;
+ font-size: 16px;
+}
+
+.mce-content-body img {
+ max-width: 100%;
+ height: auto;
+}
+
+.mce-content-body .mce-pagebreak {
+ height: 5px !important;
+}
+
+.mce-content-body a {
+ color: #4a90e2;
+ text-decoration: none;
+}
+
+.mce-content-body p,
+.mce-content-body div,
+.mce-content-body h1,
+.mce-content-body h2,
+.mce-content-body h3,
+.mce-content-body h4,
+.mce-content-body h5,
+.mce-content-body h6,
+.mce-content-body ul {
+ line-height: 1.5em;
+}
+
+.mce-content-body blockquote p {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ border-left: 5px solid #eee;
+ font-style: italic;
+}
\ No newline at end of file
diff --git a/bl-plugins/tinymce/plugin.php b/bl-plugins/tinymce/plugin.php
index d6f95cb6..da8b29c6 100644
--- a/bl-plugins/tinymce/plugin.php
+++ b/bl-plugins/tinymce/plugin.php
@@ -40,25 +40,29 @@ class pluginTinymce extends Plugin {
public function adminHead()
{
+ // Load the plugin only in the controllers setted in $this->loadOnController
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
return false;
}
- return '';
+ $html = '
'.PHP_EOL;
+ $html .= '';
+ return $html;
}
public function adminBodyEnd()
{
- global $L;
-
+ // Load the plugin only in the controllers setted in $this->loadOnController
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
return false;
}
+ // Load object $language
+ global $L;
+
$toolbar1 = $this->getValue('toolbar1');
$toolbar2 = $this->getValue('toolbar2');
- $min_height = '760';
- $content_css = $this->htmlPath().'css/bludit.css';
+ $content_css = $this->htmlPath().'css/tinymce.css';
$plugins = $this->getValue('plugins');
$lang = 'en';
@@ -74,55 +78,50 @@ class pluginTinymce extends Plugin {
$document_base_url = '';
}
-$script = <<
-// Function required for Media Manager
-// Insert an image on the editor in the cursor position
-function editorInsertMedia(filename) {
- tinymce.activeEditor.insertContent("");
-}
+ // Insert an image in the editor in the cursor position
+ // Function required for Bludit
+ function editorInsertMedia(filename) {
+ tinymce.activeEditor.insertContent("");
+ }
-// Function required for Autosave function
-// Returns the content of the editor
-function editorGetContent() {
- return tinymce.get('jseditor').getContent();
-}
+ // Returns the content of the editor
+ // Function required for Bludit
+ function editorGetContent() {
+ return tinymce.get('jseditor').getContent();
+ }
-function resizeEditor() {
- var editor = tinymce.activeEditor;
- editor.theme.resizeTo("100%", "500px");
-}
-
-tinymce.init({
- selector: "#jseditor",
- auto_focus: "jseditor",
- theme: "modern",
- skin: "bludit",
- element_format : "html",
- entity_encoding : "raw",
- schema: "html5",
- statusbar: false,
- menubar:false,
- branding: false,
- browser_spellcheck: true,
- pagebreak_separator: PAGE_BREAK,
- paste_as_text: true,
- remove_script_host: false,
- convert_urls: true,
- relative_urls: false,
- $document_base_url
- plugins: ["$plugins"],
- toolbar1: "$toolbar1",
- toolbar2: "$toolbar2",
- language: "$lang",
- content_css : "$content_css",
- height: 200
-});
+ tinymce.init({
+ selector: "#jseditor",
+ auto_focus: "jseditor",
+ theme: "modern",
+ skin: "bludit",
+ element_format : "html",
+ entity_encoding : "raw",
+ schema: "html5",
+ statusbar: false,
+ menubar:false,
+ branding: false,
+ browser_spellcheck: true,
+ pagebreak_separator: PAGE_BREAK,
+ paste_as_text: true,
+ remove_script_host: false,
+ convert_urls: true,
+ relative_urls: false,
+ $document_base_url
+ plugins: ["$plugins"],
+ toolbar1: "$toolbar1",
+ toolbar2: "$toolbar2",
+ language: "$lang",
+ content_css : "$content_css",
+ height: "200px"
+ });
EOF;
- return $script;
+ return $html;
}
}
\ No newline at end of file