Browse Source

Fix cache issue with ckeditor css

master
yflory 2 years ago
parent
commit
6af7d393fd
3 changed files with 4 additions and 2 deletions
  1. 1
      customize.dist/ckeditor-config.js
  2. 2
      www/pad/ckeditor-inner.html
  3. 3
      www/pad/inner.js

1
customize.dist/ckeditor-config.js

@ -28,7 +28,6 @@ CKEDITOR.editorConfig = function( config ) {
config.font_defaultLabel = 'Arial';
config.fontSize_defaultLabel = '16';
config.contentsCss = '/customize/ckeditor-contents.css?' + CKEDITOR.CRYPTPAD_URLARGS;
config.keystrokes = [
[ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],

2
www/pad/ckeditor-inner.html

@ -1,3 +1,3 @@
<!DOCTYPE html>
<html dir="ltr" lang="en"><head><title>Rich Text Editor, editor1</title><style data-cke-temp="1">html{cursor:text;*cursor:auto}
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/customize/ckeditor-contents.css"><link type="text/css" rel="stylesheet" href="/bower_components/ckeditor/plugins/tableselection/styles/tableselection.css"></head><body><p><br></p></body></html>
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/bower_components/ckeditor/plugins/tableselection/styles/tableselection.css"></head><body><p><br></p></body></html>

3
www/pad/inner.js

@ -452,6 +452,9 @@ define([
var $iframe = $('html').find('iframe').contents();
var ifrWindow = $html.find('iframe')[0].contentWindow;
var customCss = '/customize/ckeditor-contents.css?' + CKEDITOR.CRYPTPAD_URLARGS;
$iframe.find('head').append('<link href="' + customCss + '" type="text/css" rel="stylesheet" _fcktemp="true"/>')
framework._.sfCommon.addShortcuts(ifrWindow);
var documentBody = ifrWindow.document.body;

Loading…
Cancel
Save