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

Navigate to element by Id

1 Answer 36 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 09 Sep 2015, 09:33 AM

I want to navigate to the element in the html page. 

Here when click on  the element <a href="#top">Go to top</a>, I want to navigate at to the h2 element with id=top. 

Can we do this in the RichTextBox?

<!DOCTYPE html>
<html>
<body>
  
    <h2 id="top">Top of page!</h2>
  
    <p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.</p>
    <p>"Whenever you feel like criticizing any one," he told me, "just remember that all the people in this world haven't had the advantages that you've had."</p
    <p>He didn't say any more, but we've always been unusually communicative in a reserved way, and I understood that he meant a great deal more than that. In consequence, I'm inclined to reserve all judgments, a habit that has opened up many curious natures to me and also made me the victim of not a few veteran bores. The abnormal mind is quick to detect and attach itself to this quality when it appears in a normal person, and so it came about that in college I was unjustly accused of being a politician, because I was privy to the secret griefs of wild, unknown men. Most of the confidences were unsought-frequently I have feigned sleep, preoccupation, or a hostile levity when I realized by some unmistakable sign that an intimate revelation was quivering on the horizon; for the intimate revelations of young men, or at least the terms in which they express them, are usually plagiaristic and marred by obvious suppressions. Reserving judgments is a matter of infinite hope. I am still a little afraid of missing something if I forget that, as my father snobbishly suggested, and I snobbishly repeat, a sense of the fundamental decencies is parcelled out unequally at birth.</p>
    <p>And, after boasting this way of my tolerance, I come to the admission that it has a limit. Conduct may be founded on the hard rock or the wet marshes, but after a certain point I don't care what it's founded on. When I came back from the East last autumn I felt that I wanted the world to be in uniform and at a sort of moral attention forever; I wanted no more riotous excursions with privileged glimpses into the human heart. Only Gatsby, the man who gives his name to this book, was exempt from my reaction-Gatsby, who represented everything for which I have an unaffected scorn. If personality is an unbroken series of successful gestures, then there was something gorgeous about him, some heightened sensitivity to the promises of life, as if he were related to one of those intricate machines that register earthquakes ten thousand miles away. This responsiveness had nothing to do with that flabby impressionability which is dignified under the name of the "creative temperament"-it was an extraordinary gift for hope, a romantic readiness such as I have never found in any other person and which it is not likely I shall ever find again. No-Gatsby turned out all right at the end; it is what preyed on Gatsby, what foul dust floated in the wake of his dreams that temporarily closed out my interest in the abortive sorrows and short-winded elations of men.</p>
  
    <a href="#top">Go to top</a>
</body>
  
</html>

 

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 11 Sep 2015, 02:46 PM
Hello,

I am pasting the answer here to make it available for our community in case someone else encounters this question:

"Once the document is imported in RadRichTextBox, its structure is converted to the model of RadDocument and this navigation could be achieved with the Bookmarks. You could insert the Bookmark element at the first position of the document and then add a Hyperlink at its end, which points to the bookmark. When this is done, you will be able to click the hyperlink and go to the position where the bookmark is."

Hope this is helpful.

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Sam
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or