fix cover image when edit a page, autosize for tinymce

This commit is contained in:
Diego Najar 2018-09-19 19:01:56 +02:00
parent 74d5833aaa
commit 541cb1cec3
3 changed files with 5 additions and 3 deletions

View File

@ -51,7 +51,7 @@
// Cover image
echo Bootstrap::formInputHidden(array(
'name'=>'coverImage',
'value'=>$page->coverImage()
'value'=>$page->coverImage(false)
));
// Content
@ -115,7 +115,7 @@
}
?>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo (empty($coverImage) ? HTML_PATH_ADMIN_THEME_IMG.'default.svg' : $page->coverImage() ) ?>" />
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('External Cover image')));

View File

@ -103,6 +103,8 @@ tinymce.init({
theme: "modern",
skin: "bludit",
min_height: $min_height,
autoresize_min_height: $min_height,
autoresize_bottom_margin: 10,
max_height: 1000,
element_format : "html",
entity_encoding : "raw",

View File

@ -510,7 +510,7 @@ function install($adminPassword, $timezone)
'toolbar1'=>'formatselect bold italic bullist numlist blockquote alignleft aligncenter alignright link pagebreak image removeformat code',
'toolbar2'=>'',
'mobileToolbar'=>'bold italic bullist formatselect',
'plugins'=>'code autolink image link pagebreak advlist lists textcolor colorpicker textpattern'
'plugins'=>'code autolink image link pagebreak advlist lists textcolor colorpicker textpattern autoresize'
),
JSON_PRETTY_PRINT),
LOCK_EX