我在 AngularJS 1.6 中使用 Froala 编辑器,当我从代码 View 添加 HTML 并尝试从 View 模式进行编辑时,编辑器崩溃了。
它在我的本地系统中工作正常,我在 Windows 10 中使用 WampServer,当我在 Centos 7 的 NGINX 上部署时,它会崩溃
更多详情请查看video
编辑器版本:froala_editor v2.8.1
最佳答案
我也面临着你的问题,今天我有一个技巧来解决它。
您可以引用my answer for my question on StackOverflow here
我猜你是用CSS隐藏了Froala的unlicense的banner,所以改了11次模型就会崩溃。这是我检测这个问题的简单演示 https://stackblitz.com/edit/react-froala-editor?file=style.css .
div.fr-wrapper>div>a {
/* display: none !important; */
/* position: fixed; */
/* z-index: -99999 !important; */
font-size: 0px !important;
padding: 0px !important;
height: 0px !important;
}
在CSS代码中,如果我们使用display: none
,那么在第11次更改后就会崩溃。你可以尝试使用display: none
,编辑11次后就崩溃了。
我找到了一个处理这个问题的技巧,我不隐藏横幅,但我通过 font-size: 0
和 padding: 0
将其设置为不可见正如我上面的代码。
关于angularjs - Froala 编辑器在编辑时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51874292/