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')
|
'placeholder'=>$L->g('Title')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
echo '<div style="padding-top: 10px"></div>';
|
||||||
|
|
||||||
// Content input
|
// Content input
|
||||||
HTML::formTextarea(array(
|
// HTML::formTextarea(array(
|
||||||
'name'=>'content',
|
// 'name'=>'content',
|
||||||
'value'=>$_Page->contentRaw(false),
|
// 'value'=>$_Post->contentRaw(false),
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||||
'placeholder'=>''
|
// '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
|
// Form buttons
|
||||||
echo '<div class="uk-form-row uk-margin-bottom">';
|
echo '<div class="uk-form-row uk-margin-bottom">';
|
||||||
|
@ -29,13 +29,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
|||||||
'placeholder'=>$L->g('Title')
|
'placeholder'=>$L->g('Title')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
echo '<div style="padding-top: 10px"></div>';
|
||||||
|
|
||||||
// Content input
|
// Content input
|
||||||
HTML::formTextarea(array(
|
// HTML::formTextarea(array(
|
||||||
'name'=>'content',
|
// 'name'=>'content',
|
||||||
'value'=>$_Post->contentRaw(false),
|
// 'value'=>$_Post->contentRaw(false),
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||||
'placeholder'=>''
|
// '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
|
// Form buttons
|
||||||
echo '<div class="uk-form-row uk-margin-bottom">
|
echo '<div class="uk-form-row uk-margin-bottom">
|
||||||
|
@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
|||||||
'placeholder'=>$L->g('Title')
|
'placeholder'=>$L->g('Title')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
echo '<div style="padding-top: 10px"></div>';
|
||||||
|
|
||||||
// Content input
|
// Content input
|
||||||
HTML::formTextarea(array(
|
// HTML::formTextarea(array(
|
||||||
'name'=>'content',
|
// 'name'=>'content',
|
||||||
'value'=>'',
|
// 'value'=>'',
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||||
'placeholder'=>''
|
// 'placeholder'=>''
|
||||||
));
|
// ));
|
||||||
|
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
|
||||||
|
|
||||||
// Form buttons
|
// Form buttons
|
||||||
echo '<div class="uk-form-row uk-margin-bottom">
|
echo '<div class="uk-form-row uk-margin-bottom">
|
||||||
|
@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
|||||||
'placeholder'=>$L->g('Title')
|
'placeholder'=>$L->g('Title')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
echo '<div style="padding-top: 10px"></div>';
|
||||||
|
|
||||||
// Content input
|
// Content input
|
||||||
HTML::formTextarea(array(
|
// HTML::formTextarea(array(
|
||||||
'name'=>'content',
|
// 'name'=>'content',
|
||||||
'value'=>'',
|
// 'value'=>'',
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
// 'class'=>'uk-width-1-1 uk-form-large',
|
||||||
'placeholder'=>''
|
// 'placeholder'=>''
|
||||||
));
|
// ));
|
||||||
|
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
|
||||||
|
|
||||||
// Form buttons
|
// Form buttons
|
||||||
echo '<div class="uk-form-row uk-margin-bottom">
|
echo '<div class="uk-form-row uk-margin-bottom">
|
||||||
|
@ -108,6 +108,8 @@ class Image {
|
|||||||
|
|
||||||
// *** Resample - create image canvas of x, y size
|
// *** Resample - create image canvas of x, y size
|
||||||
$this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight);
|
$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);
|
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
|
// *** Now crop from center to exact requested size
|
||||||
$this->imageResized = imagecreatetruecolor($newWidth , $newHeight);
|
$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);
|
imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"plugin-data":
|
"plugin-data":
|
||||||
{
|
{
|
||||||
"name": "Quill",
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -72,21 +72,39 @@ class pluginQuill extends Plugin {
|
|||||||
global $Language;
|
global $Language;
|
||||||
|
|
||||||
$html = '';
|
$html = '';
|
||||||
if( $this->enabled() ) {
|
// Load CSS and JS only on Controllers in array.
|
||||||
|
if(in_array($layout['controller'], $this->loadWhenController))
|
||||||
|
{
|
||||||
$html .= '
|
$html .= '
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var quill = new Quill("#editor-container", {
|
var toolbarOptions = [
|
||||||
modules: {
|
["bold", "italic", "underline", "strike"], // toggled buttons
|
||||||
toolbar: [
|
["blockquote", "code-block"],
|
||||||
[{ header: [1, 2, false] }],
|
|
||||||
["bold", "italic", "underline"],
|
[{ "header": 1 }, { "header": 2 }], // custom button values
|
||||||
["image"]
|
[{ "list": "ordered"}, { "list": "bullet" }],
|
||||||
]
|
[{ "script": "sub"}, { "script": "super" }], // superscript/subscript
|
||||||
},
|
[{ "indent": "-1"}, { "indent": "+1" }], // outdent/indent
|
||||||
placeholder: "asd",
|
[{ "direction": "rtl" }], // text direction
|
||||||
theme: "snow"
|
|
||||||
});
|
[{ "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>
|
</script>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user