Skip to content
Browse files

Fixes issue with multiple instances on the same page.

Fixed margin
Will workaround tabbed textarea sometime in the future (yeah right!)
  • Loading branch information...
1 parent f0b1857 commit fc1d9ff3cf8cbe145daf64ddfe60303759c35c42 Giel Berkers committed
Showing with 10 additions and 10 deletions.
  1. +10 −10 assets/symphony.ckeditor.js
View
20 assets/symphony.ckeditor.js
@@ -1,20 +1,20 @@
-var ck_configurationData = {};
-ck_configurationData.language = 'en';
-ck_configurationData.skin = 'chris';
-ck_configurationData.replaceByClassEnabled = false;
-ck_configurationData.forcePasteAsPlainText = true;
-ck_configurationData.format_tags = 'p;h1;h2;h3';
-ck_configurationData.entities_processNumerical = 'force';
-ck_configurationData.filebrowserBrowseUrl = Symphony.Context.get('root') + '/symphony/extension/ckeditor/filebrowser/';
-
jQuery(document).ready(function () {
// See if there are any ckeditor textareas:
jQuery('textarea.ckeditor, textarea.ckeditor_compact').each(function(index) {
// Set the configurationdata:
+ var ck_configurationData = {};
+ ck_configurationData.language = 'en';
+ ck_configurationData.skin = 'chris';
+ ck_configurationData.replaceByClassEnabled = false;
+ ck_configurationData.forcePasteAsPlainText = true;
+ ck_configurationData.format_tags = 'p;h1;h2;h3';
+ ck_configurationData.entities_processNumerical = 'force';
+ ck_configurationData.filebrowserBrowseUrl = Symphony.Context.get('root') + '/symphony/extension/ckeditor/filebrowser/';
+
// Set the correct height and width:
ck_configurationData.height = jQuery(this).height();
- ck_configurationData.width = jQuery(this).width();
+ ck_configurationData.width = jQuery(this).width() + 8; // add some width to make up for the margins
// Check if this is the compact CKEditor:
if(jQuery(this).hasClass("ckeditor_compact"))

0 comments on commit fc1d9ff

Please sign in to comment.
Something went wrong with that request. Please try again.