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

An anchor problem in using AjaxManager and RadEditor

1 Answer 12 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 30 Aug 2012, 03:38 PM
Hi,Guys,

I put some buttons on the left and a RadEditor on the right.

What I want to do:
1.click the button,then the RadEditor will show the specific html content.
2.the buttons not only mean a hyperlink but also a anchor in one page.
when clicking the anchor,the content in RadEditor will go to a specific localtion.

I write a js function for going to the anchor's position in the RadEditor's content.
The js function(scrolltoView) is registed when clicking the button with AjaxManager.

The problem:
1.when refreshing the content in RadEditor,the js function is fired and the RadEditor goes to the right position.
2.Howerver ,after the RadEditor is refreshed completely,it looks like the RadEditor loads some css style and then it goes to the wrong position.

How could this happen?Could I excute my js function after the css of RadEditor is loaded completely?

Thanks a lot,
Jack

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Sep 2012, 03:11 PM
Hi,

If you set the CssFiles and ContentAreaCssFile properties of RadEditor to point to an empty CSS file, the editor will not load the page styles from the page and you will ensure that no external stylesheet will be loaded in the content area. See this article for more information: Content Area Appearance Problems.

You can also see this KB article which could be helpful: Implementing external Table of Contents where the links point to specific sections within RadEditor.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Jack
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or