Answer the question
In order to leave comments, you need to log in
How to display your error correctly?
The form has a TinyMCE widget with the image upload capability. When pictures are loaded, everything is OK, but when I purposefully load a file of a different format instead of a picture, I get an alert (http error 500). This code is written in tinymce .js in defaultHandler
xhr.onload = function () {
var json;
if (xhr.status < 200 || xhr.status >= 300) {
<b> failure("HTTP Error: " + xhr.status);</b>
return;
}
<?= $form->field($model, 'content')->widget(TinyMce::className(), [
'options' => ['rows' => 6],
'clientOptions' => [
'plugins' => [
"advlist autolink lists link charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste",
"image imagetools",
],
'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
'min_height' => 300,
'images_upload_url' => 'tiny-photo',
]
]);?>
Answer the question
In order to leave comments, you need to log in
to make a parallelogram shape use transform: skew(20deg);
for a white background from the top, use linear-garient where the second color is transparent. I'm sitting on the phone, I can't throw off the sandbox
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question