V
V
Vitaly Bogryashov2015-12-15 06:37:59
CKEditor
Vitaly Bogryashov, 2015-12-15 06:37:59

How to determine when inline CKEDITOR is fully loaded?

There is a page with CKEDitor in inline mode, i.e. edited in view mode. So conceived, for convenient work with the knowledge base. Articles are loaded in ajax mode when navigating through the menu tree. There was a problem with determining the height of the article (for auto-scrolling, for example), because the size of the php page loaded by AJAX does not take into account the pictures loaded later. For example, when loading, the height of the article is 200px, and after loading all the pictures, it is already 2200px, respectively, scrolling only works at 200px.

$.ajax({...}).done(function(){
//обработки после загрузки статьи
$("html").scrollTop($("#content").outerHeight());
});

In general, I noticed that I regularly encounter some uneven features of ckeditor (or maybe the problem is not in it?), That many things do not work out quite the same as if ckeditor did not exist. For example, with the autoscroll I specified, for a split second it is clear that scrolling sometimes works to the end of the page and then returns back (apparently, after initializing ckeditor).
Questions:
where should the handler code be inserted if ckeditor is used? did anyone have similar problems?
How else can I scroll an article loaded via ajax to the very bottom?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question