Merge 743a88c29bf51fe554229ac3b14da1f6f58afb1e into dc553bae2f8c4c552d74f406e8e374a6cc7a2883
This commit is contained in:
commit
d8eebb8676
@ -29,13 +29,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
'placeholder'=>$L->g('Title')
|
||||
));
|
||||
|
||||
echo '<div style="padding-top: 10px"></div>';
|
||||
|
||||
// Content input
|
||||
HTML::formTextarea(array(
|
||||
'name'=>'content',
|
||||
'value'=>$_Page->contentRaw(false),
|
||||
'class'=>'uk-width-1-1 uk-form-large',
|
||||
'placeholder'=>''
|
||||
));
|
||||
// HTML::formTextarea(array(
|
||||
// 'name'=>'content',
|
||||
// 'value'=>$_Post->contentRaw(false),
|
||||
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||
// 'placeholder'=>''
|
||||
// ));
|
||||
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" value="'.$_Post->contentRaw(false).'" style="margin-bottom: 10px"></div>';
|
||||
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">';
|
||||
@ -239,10 +242,10 @@ $(document).ready(function()
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
@ -29,13 +29,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
'placeholder'=>$L->g('Title')
|
||||
));
|
||||
|
||||
echo '<div style="padding-top: 10px"></div>';
|
||||
|
||||
// Content input
|
||||
HTML::formTextarea(array(
|
||||
'name'=>'content',
|
||||
'value'=>$_Post->contentRaw(false),
|
||||
'class'=>'uk-width-1-1 uk-form-large',
|
||||
'placeholder'=>''
|
||||
));
|
||||
// HTML::formTextarea(array(
|
||||
// 'name'=>'content',
|
||||
// 'value'=>$_Post->contentRaw(false),
|
||||
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||
// 'placeholder'=>''
|
||||
// ));
|
||||
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" value="'.$_Post->contentRaw(false).'" style="margin-bottom: 10px"></div>';
|
||||
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
@ -197,7 +200,7 @@ $(document).ready(function() {
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
'placeholder'=>$L->g('Title')
|
||||
));
|
||||
|
||||
echo '<div style="padding-top: 10px"></div>';
|
||||
|
||||
// Content input
|
||||
HTML::formTextarea(array(
|
||||
'name'=>'content',
|
||||
'value'=>'',
|
||||
'class'=>'uk-width-1-1 uk-form-large',
|
||||
'placeholder'=>''
|
||||
));
|
||||
// HTML::formTextarea(array(
|
||||
// 'name'=>'content',
|
||||
// 'value'=>'',
|
||||
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||
// 'placeholder'=>''
|
||||
// ));
|
||||
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
|
||||
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
@ -212,10 +215,10 @@ $(document).ready(function()
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
'placeholder'=>$L->g('Title')
|
||||
));
|
||||
|
||||
echo '<div style="padding-top: 10px"></div>';
|
||||
|
||||
// Content input
|
||||
HTML::formTextarea(array(
|
||||
'name'=>'content',
|
||||
'value'=>'',
|
||||
'class'=>'uk-width-1-1 uk-form-large',
|
||||
'placeholder'=>''
|
||||
));
|
||||
// HTML::formTextarea(array(
|
||||
// 'name'=>'content',
|
||||
// 'value'=>'',
|
||||
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||
// 'placeholder'=>''
|
||||
// ));
|
||||
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
|
||||
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
@ -73,7 +76,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
|
||||
// IMAGES TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>';
|
||||
@ -182,10 +185,10 @@ $(document).ready(function() {
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
@ -108,6 +108,8 @@ class Image {
|
||||
|
||||
// *** Resample - create image canvas of x, y size
|
||||
$this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight);
|
||||
imagealphablending($this->imageResized, false);
|
||||
imagesavealpha($this->imageResized, true);
|
||||
imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height);
|
||||
|
||||
|
||||
@ -230,6 +232,8 @@ class Image {
|
||||
|
||||
// *** Now crop from center to exact requested size
|
||||
$this->imageResized = imagecreatetruecolor($newWidth , $newHeight);
|
||||
imagealphablending($this->imageResized, false);
|
||||
imagesavealpha($this->imageResized, true);
|
||||
imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,6 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Quill",
|
||||
"description": ""
|
||||
"description": "Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class pluginQuill extends Plugin {
|
||||
$html .= '<input name="autosave" id="jsautosave" type="checkbox" value="1" '.($this->getDbField('autosave')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsautosave">'.$Language->get('Autosave').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input type="hidden" name="spellChecker" value="0">';
|
||||
$html .= '<input name="spellChecker" id="jsspellChecker" type="checkbox" value="1" '.($this->getDbField('spellChecker')?'checked':'').'>';
|
||||
@ -72,25 +72,43 @@ class pluginQuill extends Plugin {
|
||||
global $Language;
|
||||
|
||||
$html = '';
|
||||
if( $this->enabled() ) {
|
||||
// Load CSS and JS only on Controllers in array.
|
||||
if(in_array($layout['controller'], $this->loadWhenController))
|
||||
{
|
||||
$html .= '
|
||||
<script>
|
||||
|
||||
var quill = new Quill("#editor-container", {
|
||||
modules: {
|
||||
toolbar: [
|
||||
[{ header: [1, 2, false] }],
|
||||
["bold", "italic", "underline"],
|
||||
["image"]
|
||||
]
|
||||
},
|
||||
placeholder: "asd",
|
||||
theme: "snow"
|
||||
});
|
||||
var toolbarOptions = [
|
||||
["bold", "italic", "underline", "strike"], // toggled buttons
|
||||
["blockquote", "code-block"],
|
||||
|
||||
[{ "header": 1 }, { "header": 2 }], // custom button values
|
||||
[{ "list": "ordered"}, { "list": "bullet" }],
|
||||
[{ "script": "sub"}, { "script": "super" }], // superscript/subscript
|
||||
[{ "indent": "-1"}, { "indent": "+1" }], // outdent/indent
|
||||
[{ "direction": "rtl" }], // text direction
|
||||
|
||||
[{ "size": ["small", false, "large", "huge"] }], // custom dropdown
|
||||
[{ "header": [1, 2, 3, 4, 5, 6, false] }],
|
||||
|
||||
[{ "color": [] }, { "background": [] }], // dropdown with defaults from theme
|
||||
[{ "font": [] }],
|
||||
[{ "align": [] }],
|
||||
|
||||
["clean"] // remove formatting button
|
||||
];
|
||||
|
||||
var quill = new Quill("#jscontent", {
|
||||
modules: {
|
||||
toolbar: toolbarOptions
|
||||
},
|
||||
placeholder: "Compose an epic...",
|
||||
theme: "snow"
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user