I am using TinyMCE editor plugin with ASP.NET and MVC3.
I want to scroll to particular DIV content in html. How can i do that.
var ed = tinymce.editors[0];
var $marker = $(ed.getBody()).find('#Content_500');
tinymce.activeEditor.selection.select($marker.get(0)).focus();
With this, the specific content is selected, but the cursor doe not scroll to the content.
ANy ideas..
This is possible.
To scroll in an tinymce editor or iframe you can use the following
$(tinymce.activeEditor.getBody()).animate({ scrollTop: 300 }, { duration: 'medium', easing: 'swing' });
To scroll to a specified element you may use
$(tinymce.activeEditor.getBody()).find('#content_500').get(0).scrollIntoView();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With