在我的 firefox 43 中,如果我在 ckeditor 中放入长文本,我在 firefox 和 chrome 中会得到不同的结果。在 chrome work-wrap 中工作并通过创建新行来打断单词。但是在 firefox 中出现水平滚动条并将文本发送到窗口限制之外。为了防止这种行为,我将以下 css 应用于 ckeditor 的 contents.css 文件。但更改未加载。
浏览器的缓存是否会阻止应用更改?请帮忙。
我可以使用 php 来响应使用时间相关函数的 css 更改吗?
我没有将 contents.css 文件链接到我的页面。它保留在 ckeditor 文件中
body
{
/* Font */
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
font-size: 12px;
/* Text color */
color: #333;
-ms-word-break: break-all;
-ms-word-wrap: break-all;
-webkit-word-break: break-word;
-webkit-word-wrap: break-word;
word-wrap: break-word;
word-wrap:break-all;
-webkit-hyphens: auto;
-moz-hyphens: auto;
white-space: pre-wrap;
hyphens: auto;
/* Remove the background color to make it transparent */
background-color: #fff;
margin: 20px;
}
最佳答案
用这段代码解决了:
CKEDITOR.addCss( 'body {word-break:break-all;}' );
CKEDITOR.replace( 'editor1', {
fullPage: true
})
;
关于javascript - 对 ckeditor 的 contents.css 文件所做的更改未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34471374/