Quantcast
Channel: CKEditor™ Provider for DNN®
Viewing all articles
Browse latest Browse all 1992

Commented Issue: beta 2.0.5 editor doesn't load [7354]

$
0
0
Editor is not loading.
I get a js error:

SyntaxError: missing : after property id
dialog_backgroundCoverOpacity:0,5,dialog_buttonsOrder:'OS',dialog_magnetD...
-----------------------------------------^

value 0,5 should be 0.5 ??

--------------------------------------------------------------------------------------
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(LoadCKEditorInstance_dnn_ctr856_EditHTML_txtContent_txtContent);function LoadCKEditorInstance_dnn_ctr856_EditHTML_txtContent_txtContent(sender,args) {if (jQuery("[id*='UpdatePanel']").length == 0 && CKEDITOR && CKEDITOR.instances && CKEDITOR.instances.dnn_ctr856_EditHTML_txtContent_txtContent) { CKEDITOR.instances.dnn_ctr856_EditHTML_txtContent_txtContent.updateElement();}var editorArea=document.getElementById('dnn_ctr856_EditHTML_txtContent_txtContent'); if (editorArea == null){return;}var editortxtContent = jQuery('#dnn_ctr856_EditHTML_txtContent_txtContent').ckeditor({autoGrow_bottomSpace:0,autoGrow_maxHeight:0,autoGrow_minHeight:200,autoGrow_onStartup:false,autoParagraph:true,autoUpdateElement:true,baseFloatZIndex:10000,basicEntities:true,blockedKeystrokes:[ CKEDITOR.CTRL + 66, CKEDITOR.CTRL + 73, CKEDITOR.CTRL + 85 ],browserContextMenuOnCtrl:true,clipboard_defaultContentType:'html',colorButton_colors:'00923E,F8C100,28166F',colorButton_enableMore:true,contentsLangDirection:'',dataIndentationChars:' ',defaultLanguage:'en',dialog_backgroundCoverColor:'white',dialog_backgroundCoverOpacity:0,5,dialog_buttonsOrder:'OS',dialog_magnetDistance:20,dialog_startupFocusTab:false,disableNativeSpellChecker:true,disableNativeTableHandles:true,disableObjectResizing:false,disableReadonlyStyling:false,div_wrapTable:false,docType:'<!DOCTYPE
Comments: ** Comment from web user: rsiera **

I did some debugging.
You load and loop thought the settings in CKeditorControl.cs with
foreach (PropertyInfo info in SettingsUtil.GetEditorConfigProperties())
At one point you say:
var settingValue = info.GetValue(this.currentSettings.Config, null).ToString();
For the setting "dialog_backgroundCoverOpacity" the expression info.GetValue(this.currentSettings.Config, null) returns an Object with value "0.5", which is good.
The .ToString() however turns in into "0,5".
Normally this would be easy to solve. Just use .ToString(CultureInfo.InvariantCulture)
But the .ToString() of an object doesn't take parameters.
So, this is a solution:
change
var settingValue = info.GetValue(this.currentSettings.Config, null).ToString();

into
object rawValue = info.GetValue(this.currentSettings.Config, null);
string settingValue;
if (info.PropertyType.Name == "Double")
settingValue = Convert.ToDouble(rawValue).ToString(CultureInfo.InvariantCulture);
else
settingValue = rawValue.ToString();

It is a mistery to me why this isn't a problem in v204. I compared the source code and don't see any change that could explain that.

Anyway, this solves the javascript error with this parameter, but editor still isn't loading.
I'll investigate that further.


Viewing all articles
Browse latest Browse all 1992

Trending Articles