fix for editor and height 100%
This commit is contained in:
parent
68bea24530
commit
13605eb315
|
@ -6,7 +6,7 @@ AddDefaultCharset UTF-8
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
# Base directory
|
# Base directory
|
||||||
# RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
# Deny direct access to the next directories
|
# Deny direct access to the next directories
|
||||||
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
|
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
|
||||||
|
|
|
@ -254,4 +254,5 @@ td.child {
|
||||||
padding: 10px 5% !important;
|
padding: 10px 5% !important;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- RIGHT MAIN -->
|
<!-- RIGHT MAIN -->
|
||||||
<div class="col-lg-10 pt-3 h-100">
|
<div class="col-lg-10 pt-3 pb-1 h-100">
|
||||||
<?php
|
<?php
|
||||||
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
|
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
|
||||||
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
|
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
|
||||||
|
|
|
@ -69,7 +69,7 @@ echo Bootstrap::formOpen(array(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Editor -->
|
<!-- Editor -->
|
||||||
<div id="jseditor" class="editable h-100" style=""></div>
|
<div id="jseditor" class="editable h-100 mb-1"></div>
|
||||||
|
|
||||||
<!-- Modal for Cover Image -->
|
<!-- Modal for Cover Image -->
|
||||||
<div id="jscoverImageModal" class="modal" tabindex="-1" role="dialog">
|
<div id="jscoverImageModal" class="modal" tabindex="-1" role="dialog">
|
||||||
|
|
|
@ -1,37 +1,12 @@
|
||||||
body {
|
.mce-tinymce,
|
||||||
padding: 10px 5% !important;
|
.mce-stack-layout,
|
||||||
font-size: 16px;
|
.mce-edit-area{
|
||||||
|
display: flex!important;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
align-items:stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mce-content-body img {
|
.mce-tinymce iframe{
|
||||||
max-width: 100%;
|
flex: 1;
|
||||||
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;
|
|
||||||
}
|
}
|
|
@ -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;
|
||||||
|
}
|
|
@ -40,25 +40,29 @@ class pluginTinymce extends Plugin {
|
||||||
|
|
||||||
public function adminHead()
|
public function adminHead()
|
||||||
{
|
{
|
||||||
|
// Load the plugin only in the controllers setted in $this->loadOnController
|
||||||
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
|
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<script src="'.$this->htmlPath().'tinymce/tinymce.min.js"></script>';
|
$html = '<link rel="stylesheet" href="'.$this->htmlPath().'css/bludit.css">'.PHP_EOL;
|
||||||
|
$html .= '<script src="'.$this->htmlPath().'tinymce/tinymce.min.js"></script>';
|
||||||
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function adminBodyEnd()
|
public function adminBodyEnd()
|
||||||
{
|
{
|
||||||
global $L;
|
// Load the plugin only in the controllers setted in $this->loadOnController
|
||||||
|
|
||||||
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
|
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load object $language
|
||||||
|
global $L;
|
||||||
|
|
||||||
$toolbar1 = $this->getValue('toolbar1');
|
$toolbar1 = $this->getValue('toolbar1');
|
||||||
$toolbar2 = $this->getValue('toolbar2');
|
$toolbar2 = $this->getValue('toolbar2');
|
||||||
$min_height = '760';
|
$content_css = $this->htmlPath().'css/tinymce.css';
|
||||||
$content_css = $this->htmlPath().'css/bludit.css';
|
|
||||||
$plugins = $this->getValue('plugins');
|
$plugins = $this->getValue('plugins');
|
||||||
|
|
||||||
$lang = 'en';
|
$lang = 'en';
|
||||||
|
@ -74,55 +78,50 @@ class pluginTinymce extends Plugin {
|
||||||
$document_base_url = '';
|
$document_base_url = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$script = <<<EOF
|
$html = <<<EOF
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
// Function required for Media Manager
|
// Insert an image in the editor in the cursor position
|
||||||
// Insert an image on the editor in the cursor position
|
// Function required for Bludit
|
||||||
function editorInsertMedia(filename) {
|
function editorInsertMedia(filename) {
|
||||||
tinymce.activeEditor.insertContent("<img src=\""+filename+"\" alt=\"\">");
|
tinymce.activeEditor.insertContent("<img src=\""+filename+"\" alt=\"\">");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function required for Autosave function
|
// Returns the content of the editor
|
||||||
// Returns the content of the editor
|
// Function required for Bludit
|
||||||
function editorGetContent() {
|
function editorGetContent() {
|
||||||
return tinymce.get('jseditor').getContent();
|
return tinymce.get('jseditor').getContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resizeEditor() {
|
tinymce.init({
|
||||||
var editor = tinymce.activeEditor;
|
selector: "#jseditor",
|
||||||
editor.theme.resizeTo("100%", "500px");
|
auto_focus: "jseditor",
|
||||||
}
|
theme: "modern",
|
||||||
|
skin: "bludit",
|
||||||
tinymce.init({
|
element_format : "html",
|
||||||
selector: "#jseditor",
|
entity_encoding : "raw",
|
||||||
auto_focus: "jseditor",
|
schema: "html5",
|
||||||
theme: "modern",
|
statusbar: false,
|
||||||
skin: "bludit",
|
menubar:false,
|
||||||
element_format : "html",
|
branding: false,
|
||||||
entity_encoding : "raw",
|
browser_spellcheck: true,
|
||||||
schema: "html5",
|
pagebreak_separator: PAGE_BREAK,
|
||||||
statusbar: false,
|
paste_as_text: true,
|
||||||
menubar:false,
|
remove_script_host: false,
|
||||||
branding: false,
|
convert_urls: true,
|
||||||
browser_spellcheck: true,
|
relative_urls: false,
|
||||||
pagebreak_separator: PAGE_BREAK,
|
$document_base_url
|
||||||
paste_as_text: true,
|
plugins: ["$plugins"],
|
||||||
remove_script_host: false,
|
toolbar1: "$toolbar1",
|
||||||
convert_urls: true,
|
toolbar2: "$toolbar2",
|
||||||
relative_urls: false,
|
language: "$lang",
|
||||||
$document_base_url
|
content_css : "$content_css",
|
||||||
plugins: ["$plugins"],
|
height: "200px"
|
||||||
toolbar1: "$toolbar1",
|
});
|
||||||
toolbar2: "$toolbar2",
|
|
||||||
language: "$lang",
|
|
||||||
content_css : "$content_css",
|
|
||||||
height: 200
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
EOF;
|
EOF;
|
||||||
return $script;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue