Laravel 实战开发知乎:美化编辑器
打赏作者

mostwin

是美观。。。

laixiaojie

请问有什么方法可以实现图片裁剪吗?用七牛吗?

JellyBool 回复 laixiaojie

你看一下 intervention/image 这个 package

laixiaojie 回复 JellyBool

这个很棒,谢谢啦

746019546

上传图片的在手机端自适应有问题吖…

CaiLiguang

请问本地上传图片失败,请重试。是什么原因造成的

JellyBool 回复 CaiLiguang

服务器的配置吧,比如是否满足 laravel 的路由重写规则

CaiLiguang 回复 JellyBool

已经解决了,上传的路径没有权限

hard88

你好站长,想问一下在这个新主题中如何添加上传视频或视频链接就像默认的一样,我试着在toolbar中添加了’insertvideo’,出现了按钮,但是是空的

JellyBool 回复 hard88

这个新的主题没有开启视频的功能。。你可以使用原来的

hard88 回复 JellyBool

知道了~~~

Psychic_role

上传了很多垃圾图片到服务器,取消发布却没有同时删除掉,这也很危险啊

Frank0Hao 回复 Psychic_role

哈哈哈同意哦

Michel

如果提交的时候验证失败,上传的图片好像就没有了,要怎么处理啊?

JellyBool 回复 Michel

图片就是个地址吧,你把 content 的内容通过 old() 方法取回来就好了吧

Michel 回复 JellyBool

用old方法没取到

<script id="container" name="body" style="height: 200px" type="text/plain">
                                    {!! old('body') !!}
</script>
JellyBool 回复 Michel

你写成这样试试:

<textarea id="container" name="body" style="height: 200px">
                                    {!! old('body') !!}
</textarea >

或者
<textarea id="container" name="body" style="height: 200px" value=" {!! old('body') !!}">
                                   
</textarea >
Michel 回复 JellyBool

可以了,谢啦

biggerdong

还想再添加一些图标功能,请问修改的大概思路是什么啊,修改哪些文件呢?要额外用AI做一套png的icon图标么

JellyBool 回复 biggerdong

修改 ueditor 的 css 样式,然后替换自己的 图标

liujun

为什么设置了width100%还是无效呢?调了好久还是不行

JellyBool 回复 liujun

它的父级元素也要有具体的宽度

hate

ueditor.all.js:8228 GET http://localhost/ueditor/server?action=config&&noCache=1526989712594 404 (Not Found)
doAjax @ ueditor.all.js:8228
request @ ueditor.all.js:8372
(anonymous) @ ueditor.all.js:8069
setTimeout (async)
UE.Editor.loadServerConfig @ ueditor.all.js:8059
UE.Editor @ ueditor.all.js:6732
UE.ui.Editor @ ueditor.all.js:29194
UE.getEditor @ ueditor.all.js:29318
(anonymous) @ edit:127
ueditor.all.js:8092 请求后台配置项http错误,上传功能将不能正常使用!
showErrorMsg @ ueditor.all.js:8092
onerror @ ueditor.all.js:8083
xhr.onreadystatechange @ ueditor.all.js:8220
XMLHttpRequest.send (async)
doAjax @ ueditor.all.js:8228
request @ ueditor.all.js:8372
(anonymous) @ ueditor.all.js:8069
setTimeout (async)
UE.Editor.loadServerConfig @ ueditor.all.js:8059
UE.Editor @ ueditor.all.js:6732
UE.ui.Editor @ ueditor.all.js:29194
UE.getEditor @ ueditor.all.js:29318
(anonymous) @ edit:12
不知道从何处找起来

JellyBool 回复 hate

你的 apache 或者 nginx 没配置好