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

[Solved] createRestorePoint/select - strange behavior

3 Answers 189 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tommy
Top achievements
Rank 1
Tommy asked on 07 Jan 2008, 08:17 AM
Hello,

I've been looking at a trial version of the Prometheus RadEditor and am rather impressed by its functionality. It seems to do everything my company requires.

However, I've run into a strange problem with the createRestorePoint-method.When used in a table, it jumps to the next cell.

To recreate the problem, create a button that does the following (replace the editor-id obviously :-) ):
{
restorePoint = $find('<%=RadEditor.ClientID%>').createRestorePoint();
restorePoint.select();
}

When this code is fired when the cursor is in a table cell, the cursor moves to the next cell!

I have noticed that your tables always contain a non-breaking space character (&nbsp;) in every empty cell. When the cursor is on the right side of this character it moves to the next cell, when on the left, it stays where it is. Very strange... The problem is not limited to these empty cells, though.

Also, when this code is used outside a table, the cursor will often jump two lines down.

Any idea what causes this behavior?

Oh, and one more question: Any way to disable the resize-functionality of the editor-window?

Thanks in advance!

Regards
TJ

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 07 Jan 2008, 01:55 PM
Hello Tommy,

We implement some improvements in the PasteHtml function of RadEditor "Prometheus" and it should work as expected without the need to set a restorepoint. Therefore my suggestion is to remove the following code:

restorePoint = $find('<%=RadEditor.ClientID%>').createRestorePoint();
restorePoint.select();

and to test again your paste scenario.

If the problem still persists, please open a support ticket and send a sample working project that demonstrates the problem. To be able to open a support ticket you should be a customer or to have downloaded some control's installation or the RadControls suite. Once I receive the project I will examine it and try to provide a solution.

You can easily disable the resizing of RadEditor by using a simple CSS for hiding the resize area. Just add the following CSS to your page and you are all set:

<style>
.rade_resizeCell

    width:0px !important;
}
.rade_resizeCell DIV

    display:none;
}
</style>



Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tommy
Top achievements
Rank 1
answered on 07 Jan 2008, 02:50 PM
Hi again, and thanks for your quick reply.

I realise now I should have been clearer in my first post.

I need createRestorePoint because the pasteHtml is used from a popup-DIV, triggered by a custom button. When the user selects a value from the popup, the editor loses focus, and the value is pasted at the beginning of the text, not where the cursor used to be. In the version I'm using (2007.2.1010.0 - trial), pasteHtml does not automatically remember the cursor's position, but perhaps this has been implemented in a newer version?

Regards,
TJ
0
Rumen
Telerik team
answered on 07 Jan 2008, 03:15 PM
Hi Tommy,

Please, upgrade your project to use the latest version of RadEditor "Prometheus" (the build included in the RadControls 2007 Q3 - Telerik.Web.UI_2007_3_1218_dev_hotfix.zip). This should fix the "paste" issue.


If you still experience the problem, please open a support ticket and send a sample working project that demonstrates the problem.


Kind regards,
Rumen
the Telerik team

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