You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Editor
- custom behaviour needed: scrolling / jumping to end of content
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Hi everyone,
I have a client request to scroll to the end of the content on large contents in JCE. Now as it is an iFrame, I cannot use just Javascript to impact the iFrame, but it looks as though TinyMCE offers an API with which such an action "on init" is possible (see here for example), which makes me think (hope) that as JCE inherits from TinyMCE, I should be able to do something similar with JCE.
I have tried to follow this and also tried adapting it to the initiation of JCE in joomla however, I had absolutely no success and can't find an API documentation. Any chance someone could point me into the right direction of a documentation or how to adapt TinyMCE examples to work with JCE?
Also, I am asked to actually place the cursor to the end, but I think that is less of an issue.
Thanks for any lead...
Terry
I have a client request to scroll to the end of the content on large contents in JCE. Now as it is an iFrame, I cannot use just Javascript to impact the iFrame, but it looks as though TinyMCE offers an API with which such an action "on init" is possible (see here for example), which makes me think (hope) that as JCE inherits from TinyMCE, I should be able to do something similar with JCE.
I have tried to follow this and also tried adapting it to the initiation of JCE in joomla however, I had absolutely no success and can't find an API documentation. Any chance someone could point me into the right direction of a documentation or how to adapt TinyMCE examples to work with JCE?
Also, I am asked to actually place the cursor to the end, but I think that is less of an issue.
Thanks for any lead...
Terry
more than a month ago
·
#97926
Sorry, forgot to add the link: http://archive.tinymce.com/forum/viewtopic.php?id=33070
Create a file called editor.js in media/jce/js/
Add this to the file
Add this to the file
(function() {
tinyMCE.onAddEditor.add(function (mgr, ed) {
ed.onInit.add(function(ed) {
ed.focus();
ed.selection.select(ed.dom.select('body')[0]);
ed.selection.collapse();
ed.getWin().scrollTo(0, ed.getBody().scrollHeight);
});
});
})();
Just because you're not paranoid doesn't mean everybody isn't out to get you.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!