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

How to achieve these in newer version

7 Answers 296 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shane
Top achievements
Rank 1
Shane asked on 26 Sep 2007, 05:38 AM
Hi Guys

I was trying to find these in the doc, but no luck.

  • editor.Toolbars("MainToolbar").Tools.Item("Preview").IsEnabled = False. I have tried editor.Tools(0).Tools.Item(2).Visible = False. But some times it doesn't work. And I think the old way is better, because I just need to specify the menu name rather than the index.
  • editor.Modules("RadEditorNodeInspector").IsVisible = True

  • RadEditorCommandList["Tag Insert"] = function(commandName, editor, oTool)
                {
                    theEditor = editor;
                    var value = oTool.GetSelectedValue();
                    EditorPasteHtml(value);               
                };
  • RadEditorCommandList["ImageManager"] = function (commandName, editor, oTool)
                {
                    theEditor = editor;
                    editor.showDialog(
                        "/Editor/ImageManager.aspx"
                        , null
                        , 760
                        , 600
                        , EditorPasteHtml
                        , null
                        , "Image Manager");
                }; 
  • When I add a link tag the dropdownlist won't work. When I switch to html view and the switch back to design view, nothing works.
  • How do I add custom css dropdownlist. Previously I was doing like editor.cssFiles = hashtable. I have tried Dim css As New EditorCssFileCollection
    css.add("style.css")
    editor.cssFiles.addrange(css), but didn't work. So I tried to use for each loop to go through the cssfiles and add one by one editor.cssFiles.add(cs).
  • Modules doesn't show up.

Could you guys please point me to the right direction?

7 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 26 Sep 2007, 09:07 AM
Hi Shane,

  • editor.Toolbars("MainToolbar").Tools.Item("Preview").IsEnabled = False. I have tried editor.Tools(0).Tools.Item(2).Visible = False. But some times it doesn't work. And I think the old way is better, because I just need to specify the menu name rather than the index.

You could get a specific tool in RadEditor Prometheus using the FindTool() metod:
EditorTool tool = RadEditor1.FindTool("FindAndReplace");
if (tool != null)
{
 tool.Enabled = false;
}

  • editor.Modules("RadEditorNodeInspector").IsVisible = True

RadEditor Prometheus still has no modules. They will be included in SP1, scheduled for October 10.

  • RadEditorCommandList["Tag Insert"] = function(commandName, editor, oTool)
                {
                    theEditor = editor;
                    var value = oTool.GetSelectedValue();
                    EditorPasteHtml(value);               
                };
  • RadEditorCommandList["ImageManager"] = function (commandName, editor, oTool)
                {
                    theEditor = editor;
                    editor.showDialog(
                        "/Editor/ImageManager.aspx"
                        , null
                        , 760
                        , 600
                        , EditorPasteHtml
                        , null
                        , "Image Manager");
                }; 

The new way to create / modify the client commands is:
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList.MyCommand = function(commandName, editor, tool)
{
 ...
 return false;
}
</script>

  • When I add a link tag the dropdownlist won't work. When I switch to html view and the switch back to design view, nothing works.

Could you please provide some more information about this problem?

  • How do I add custom css dropdownlist. Previously I was doing like editor.cssFiles = hashtable. I have tried Dim css As New EditorCssFileCollection
    css.add("style.css")
    editor.cssFiles.addrange(css), but didn't work. So I tried to use for each loop to go through the cssfiles and add one by one editor.cssFiles.add(cs).

We recommend using the following code to add CSS classes to the RadEditor dropdown
in Page_Load:
if (!IsPostBack)
{
    RadEditor1.CssClasses.Add(
"Class title", "class");
}

  • Modules doesn't show up.

RadEditor Prometheus still has no modules. They will be included in SP1, scheduled for October 10.



All the best,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shane
Top achievements
Rank 1
answered on 27 Sep 2007, 02:03 AM
Thanks for that Valeri.

Will this work?

Telerik.Web.UI.Editor.CommandList.MyCommand = function(commandName, editor, tool)
{
 
                editor.showDialog(
                    "/Editor/ImageManager.aspx"
                    , null
                    , 760
                    , 600
                    , EditorPasteHtml
                    , null
                    , "Image Manager");

 return false;
}
Because I am getting javascript errors.

Another question, how do I stop the javascript from executing?

Cheers
Shane

0
Shane
Top achievements
Rank 1
answered on 27 Sep 2007, 04:34 AM
And another problem

Please paste this HTML code and try to apply font name to any of the text.

<html>
    <head>
        <title>Business Catalyst - The better way to manage your online business and grow profits.</title>
        <link rel="StyleSheet" type="text/css" href="/ModuleStyleSheets.css" />
    </head>
    <body>
        <center>
        <table width="760" cellspacing="0" cellpadding="0" border="0" style="border-top: 1px solid gray;" class="footer" _moz_resizing="true">
            <tbody>
                <tr>
                    <td align="left">sdsdsdsdsd.</td>
                </tr>
            </tbody>
        </table>
        </center>
    </body>
</html>


Cheers
Shane
0
Rumen
Telerik team
answered on 27 Sep 2007, 03:40 PM
Hi Shane,

I pasted the provided full HTML content in Html mode of RadEditor and I was able to apply font name to the content. You can see my test in the attached video. Am I missing something? Could you please tell us what your editor's configuration is and how to reproduce the problem?

Regarding the showDialog functionality: we are currently finalizing the custom dialogs' API and when we are ready we will update our documentation and post examples. This will be most likely in the SP1 release of RadControls Q2 2007, scheduled for October 10, 2007.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shane
Top achievements
Rank 1
answered on 27 Sep 2007, 10:56 PM
Hi Rumen

Thanks for your reply Rumen.

You are right!. But not quite right :-). It works in IE but not in Firefox.

Cheers
Shane




0
Rumen
Telerik team
answered on 28 Sep 2007, 06:49 AM
Hi Shane,

Thank you for the additional info, Shane!

I was able to reproduce the problem and I logged it in our bug tracking system. We will research what is causing the problem and will do our best to fix it in the upcoming RadEditor "Prometheus" update.

As a small note of gratitude for your bug report, we updated your telerik points.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shane
Top achievements
Rank 1
answered on 28 Sep 2007, 08:03 AM

Hi Rumen

I just wanted to make sure that the new Rad Editor work better than the current version. Because I had some problem with the old version. I hope the service pack will solve all problems.

All the best guys! :-)

Cheers

Shane

Tags
Editor
Asked by
Shane
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Shane
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or