【问题标题】:Changes made to contents.css file of ckeditor not loading对 ckeditor 的 contents.css 文件所做的更改未加载
【发布时间】:2016-03-31 23:53:35
【问题描述】:

在我的 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;
}

【问题讨论】:

    标签: javascript php html css firefox


    【解决方案1】:

    用这段代码解决了:

        CKEDITOR.addCss( 'body {word-break:break-all;}' );
        CKEDITOR.replace( 'editor1', {
          fullPage: true
        })
    
    ;
    

    【讨论】:

      【解决方案2】:

      我通过在第 21 行的 contents.css 中添加以下内容来解决此问题:

      .cke_editable {
      font-size: 13px;
      line-height: 1.6;
      word-break: break-all;  <-- add this
      

      【讨论】:

      • 很奇怪。它在 Firefox 和 chrome 上都适用于我。你能把你网站的链接发给我吗?
      • 感谢您的帮助:) 解决了这个问题。将其作为答案发布在下面
      猜你喜欢
      • 2020-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 2021-03-30
      相关资源
      最近更新 更多