Does anybody know how to set the size of the window that pops up when we press the "Preview" button in the CKEditor toolbar?
I see that this question has been asked in past topics, but never answered.
If possible, I would like to have as much control as possible over the preview window.. position, size, CSS, etc.
I see that this question has been asked in past topics, but never answered.
If possible, I would like to have as much control as possible over the preview window.. position, size, CSS, etc.
Re: Size of Preview Window
I found out how to control size, position and CSS of the preview window..
In folder /ckeditor/_source/plugins/preview, I had to modify plugin.js
Starting @ line 56, this is what you want to look at:
I want a fixed width, so I entered my width here:
..then commented the line in the "try" section:
I also wanted my window to have a 100% height, so my iHeight line in the "try" section looks like this:
..and I wanted my window centered horizontally, so in the same section, the iLeft line looks like:
Now repackage CKE and voila!
As far as controling the CSS of the preview window, add a line to your config.js with a new path to your CSS:
..or look at the contents.css file in your CKE root folder.