Open jammykam opened 10 years ago
As an example, Sitecore 7.2 open in a separate dialog.
Some further notes. When you click "Show Editor"the POST to 'field editor.aspx' contains the value "richtext:edit" whereas clicking "Edit HTML" POSTS value 'richtext:edithtml'. This causes the corresponding methods in to be invoked in "Sitecore.Shell.Applications.ContentEditor.RichText, Sitecore.Kernel"
In Sitecore 7.0 the response is from the method is: SheerResponse.Eval("scContent.editRichText(\"" + (object) url + "\", \"" + (string) (object) md5Hash.ToShortID() + "\", " + StringUtil.EscapeJavascriptString(this.Value) + ")");
Whereas the edithml and Sitecore send the following which cause the window to open in a new modal: SheerResponse.ShowModalDialog(url.ToString(), "1200px", "700px", string.Empty, true, "1200px", (string) null);
This Class is invoked from "Sitecore.Shell.Applications.ContentManager.FieldEditorPage, Sitecore.Client" via reflection (I think) but I couldn't figure out where this is declared. If so it should be possible to swap out for own implementation that uses a modal window instead.
EDIT: Of course, it's a fieldType and the so a combination of control source in config and then in the Field Type definition in the core database. Opening in a modal still did not fix the issue though :(
The following error is thrown when a Rich Text Field is present on the Rendering Parameters window:
Uncaught TypeError: Cannot read property 'saveRichText' of undefined EditorPage.js:51 Sitecore.Controls.RichEditor.Class.create.saveRichText EditorPage.js:51 (anonymous function) VM1107:1scSitecore.process Sitecore.js:911 scRequest.resume Sitecore.js:1641 scRequest.handle Sitecore.js:1560 scRequest.execute Sitecore.js:1530 scSitecore.postRequest Sitecore.js:760 scSendRequest EditorPage.aspx?da=core&id=%7BBE9832A5-9F32-46F6-968F-953AB50845B8%7D&ed=FIELD43128862&vs&la=en&fld…:122 (anonymous function) VM1105:1 scSitecore.postEvent Sitecore.js:649 onclick
The RTE field appears in the same window rather than a separate window like in Sitecore 7.2