javascript - 对 ckeditor 的 contents.css 文件所做的更改未加载

标签 javascript php html css firefox

在我的 firefox 43 中,如果我在 ckeditor 中放入长文本,我在 firefox 和 chrome 中会得到不同的结果。在 chrome work-wrap 中工作并通过创建新行来打断单词。但是在 firefox 中出现水平滚动条并将文本发送到窗口限制之外。为了防止这种行为,我将以下 css 应用于 ckeditor 的 contents.css 文件。但更改未加载。

浏览器的缓存是否会阻止应用更改?请帮忙。

我可以使用 php 来响应使用时间相关函数的 css 更改吗?

我没有将 contents.css 文件链接到我的页面。它保留在 ckeditor 文件中

enter image description here

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/

相关文章:

html - 如何在嵌入式 swf 上隐藏边框

javascript - Google Maps API + Google Maps Engine/我的 map

javascript - 在 puppeteer 中获取带有类名的独占类名列表

html - polymer 中的valueattr是什么?

php - 填充空提交结果 mysql php

php - MySQL 加盟亏本

jquery - 多级子菜单在点击时不关闭子菜单

javascript - HTML/JS : Delete a form?

javascript - 从字符串 jQuery 中删除字符串

php - 将身份证号码添加到数据库PHP