This is a migrated thread and some comments may be shown as answers.

Custom Doalog & Ajax issue

2 Answers 139 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 2
Matt asked on 07 Jul 2008, 06:00 AM

I have a RadEditor (version 415)  in UserControl surounded by a standard panel, I am using a RadTree to load the content in the User control and also load html from my database etc... so far so good.

Now in my Rad Editor I have all the tools etc.. and 1 Custom Dialog.
when the Ajaxing is switched on a browser pop up says the that the custom dialog command is not implemented, thats because the js is not rendering on the page. All the other Dialogs work fine.

I upgraded to release version 619 and then none of the dialogs worked at all so I have to revert back to version 415.

I have tried registering the script block and movimng it into the Page scope from the ascx, but no love there either I have spend a day on this and I'm about to give the whole telerik ajax thing the flick if I can't get this working.

[CODE]

<

telerik:RadEditor

ID="RadEditor1"

runat="server"

Width="99%"

height="650"

Skin="WebBlue"

>

<Tools>

<telerik:EditorToolGroup>

<telerik:EditorTool Name="AjaxSpellCheck" />

<telerik:EditorTool name="FindAndReplace" shortcut="CTRL+F" />

<telerik:EditorSeparator />

<telerik:EditorTool name="Cut" shortcut="CTRL+X" />

<telerik:EditorTool name="Copy" shortcut="CTRL+C" />

<telerik:EditorTool name="Paste" shortcut="CTRL+V" />

<telerik:EditorTool name="PasteFromWord" />

<telerik:EditorTool name="PasteFromWordNoFontsNoSizes" />

<telerik:EditorTool name="PastePlainText" />

<telerik:EditorTool name="PasteAsHtml" />

<telerik:EditorSeparator />

<telerik:EditorTool name="Undo" shortcut="CTRL+Z" />

<telerik:EditorTool name="Redo" shortcut="CTRL+Y" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="ImageManager" shortcut="CTRL+G" />

<telerik:EditorTool name="ImageMapDialog" />

<telerik:EditorTool name="AbsolutePosition" />

<telerik:EditorSeparator />

<telerik:EditorTool name="FlashManager" />

<telerik:EditorTool name="MediaManager" />

<telerik:EditorTool name="DocumentManager" />

<telerik:EditorTool name="TemplateManager" />

<telerik:EditorTool name="LinkManager" shortcut="CTRL+K" />

<telerik:EditorTool name="Unlink" shortcut="CTRL+SHIFT+K" />

<telerik:EditorTool Name="InsertSpecialLink" Text="Insert Page Link" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="Bold" shortcut="CTRL+B" />

<telerik:EditorTool name="Italic" shortcut="CTRL+I" />

<telerik:EditorTool name="Underline" shortcut="CTRL+U" />

<telerik:EditorTool name="StrikeThrough" />

<telerik:EditorSeparator />

<telerik:EditorTool name="JustifyLeft" />

<telerik:EditorTool name="JustifyCenter" />

<telerik:EditorTool name="JustifyRight" />

<telerik:EditorTool name="JustifyFull" />

<telerik:EditorTool name="JustifyNone" />

<telerik:EditorSeparator />

<telerik:EditorTool name="Indent" />

<telerik:EditorTool name="Outdent" />

<telerik:EditorTool name="InsertOrderedList" />

<telerik:EditorTool name="InsertUnorderedList" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="ConvertToLower" />

<telerik:EditorTool name="ConvertToUpper" />

<telerik:EditorSeparator />

<telerik:EditorTool name="InsertTable" />

<telerik:EditorTool name="InsertSnippet" />

<telerik:EditorTool name="InsertFormElement" />

<telerik:EditorTool name="InsertSymbol" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="ForeColor" />

<telerik:EditorTool name="BackColor" />

<telerik:EditorSeparator />

<telerik:EditorTool name="FontName" />

<telerik:EditorTool name="FontSize" />

<telerik:EditorTool name="ApplyClass" />

<telerik:EditorTool name="InsertCustomLink" />

<telerik:EditorTool name="FormatBlock" />

<telerik:EditorSeparator />

<telerik:EditorTool name="FormatStripper" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="IncreaseSize" shortcut="F10" />

<telerik:EditorTool name="DecreaseSize" shortcut="F9" />

<telerik:EditorTool name="Print" shortcut="CTRL+P" />

<telerik:EditorTool name="Superscript" />

<telerik:EditorTool name="Subscript" />

<telerik:EditorTool name="InsertParagraph" />

<telerik:EditorTool name="InsertHorizontalRule" />

<telerik:EditorTool name="InsertDate" />

<telerik:EditorTool name="InsertTime" />

<telerik:EditorSeparator />

<telerik:EditorTool name="AboutDialog" />

<telerik:EditorTool name="Help" shortcut="F1" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup>

<telerik:EditorTool name="ToggleScreenMode" shortcut="F11" />

<telerik:EditorTool name="ToggleTableBorder" />

<telerik:EditorTool name="Zoom" />

<telerik:EditorTool name="ModuleManager" />

<telerik:EditorTool name="ToggleDocking" />

<telerik:EditorTool name="RepeatLastCommand" shortcut="F4" />

</telerik:EditorToolGroup>

</Tools>

<DocumentManager DeletePaths="/Documents/" UploadPaths="/Documents/" ViewPaths="/Documents/" />

<ImageManager DeletePaths="/Images/" UploadPaths="/Images/" ViewPaths="/Images/" />

<MediaManager UploadPaths="/Media/" DeletePaths="/Media/"

ViewPaths="/Media/"

SearchPatterns="*.wma,*.wmv,*.avi,*.wav,*.mpeg,*.mpg,*.mpe,*.mp3,*.divx,*.m3u,*.mid,*.midi,*.snd,*.mkv,*.m4v,*.mp4"

MaxUploadFileSize="10240000">

</MediaManager>

<TemplateManager UploadPaths="/Templates/" DeletePaths="/Templates/" ViewPaths="/Templates/" />

<FlashManager UploadPaths="/Flash/" DeletePaths="/Flash/" ViewPaths="/Flash/" />

</telerik:RadEditor>


<script type="text/javascript">

//<![CDATA[

Telerik.Web.UI.Editor.CommandList[

"InsertSpecialLink"] = function(commandName, editor, args)

{

var elem = editor.getSelectedElement(); //returns the selected element.

if (elem.tagName == "A")

{

editor.selectElement(elem);

argument = elem;

}

else

{

var content = editor.getSelectionHtml();

var link = editor.get_document().createElement("A");

link.innerHTML = content;

argument = link;

}

var myCallbackFunction = function(sender, args)

{

editor.pasteHtml(String.format(

"<a href=\"{0}\" originalAttribute="href" originalPath="\"{0}\"" >{1}</a> ", args.href, args.name))

}

editor.showDialog(

"InsertSpecialLink", argument, myCallbackFunction);

};

</script>

//// Code Behind Called on Page Load


private void InsertCustomDialogues()

{

DialogDefinition insertSpecialLinkDialogDefinition = new DialogDefinition("~/UI/Content/ItemSelect.ascx", new DialogParameters());

insertSpecialLinkDialogDefinition.Modal =

true;
insertSpecialLinkDialogDefinition.VisibleTitlebar =
true;
insertSpecialLinkDialogDefinition.VisibleStatusbar =
true;
insertSpecialLinkDialogDefinition.Width =
Unit.Pixel(250);
insertSpecialLinkDialogDefinition.Height =
Unit.Pixel(650);
insertSpecialLinkDialogDefinition.VisibleStatusbar =
false;

RadEditor1.AddDialogDefinition(

"InsertSpecialLink", insertSpecialLinkDialogDefinition);

}




[CODE]

2 Answers, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 2
answered on 07 Jul 2008, 06:33 AM
Justr to add to this why would all of the Dialogues in the rad Editor stop working when updgrading from 415 to 619, I'd rather have the bug fixes and enhancements in 619 if some one can point me in the right direction.

cheers

matt
0
Rumen
Telerik team
answered on 07 Jul 2008, 01:08 PM
Hi Matt,

It will be best if you can open a support ticket and send us a sample working project with RadControls for ASP.NET AJAX 2008.1.415, which demonstrates the problem. I will examine it and try to provide a solution.

I will also upgrade to the latest version and see whether I will be able to reproduce the reported problem. If I reproduce it on my end, I will see what is causing it and again try to provide a solution.

Looking forward to hearing from you soon,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Matt
Top achievements
Rank 2
Answers by
Matt
Top achievements
Rank 2
Rumen
Telerik team
Share this question
or