-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add article describing the delayed editor initialisation feature #363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of the separate section and the broad description since the concept described here is not that easy to understand 👍 Still, I would try to focus on making the description as simple as possible (which doesn't mean short) to make it easy to understand. I added few suggestions and corrections, but feel free to adjust them further.
I also wonder if we should use term like "editor (parent) element" or maybe "editor container"?
Hmmm, we have both Guides and Features section which is sometimes confusing. Guides are kind of dev guides so the topic of delaying editor (as this is configuration stuff and may require coding) fits there. OTOH it's a feature which can be simply enabled via config so fits in Features section too 🤔
I guess it will be good to have discoverability in mind (how the person not knowing about this feature can find it).
Apart from that I see common cases where it is useful are already mentioned but it will be good to mention cases where it might break something (e.g. editor not initializing) so one may try to disable this feature to solve the issue.
I thought about that. Probably I should check if I'm 100% consistent here, but:
My way of thinking: Guides are for people who just start with CKEditor or try to achieve some functionality. Features are like "more advanced things" which you can use if you are more proficient with the editor. Also, it was made as a 'feature' during development and it is a kind of non-standard usage. |
Hi @f1ames, ready for another review. The changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I did some corrections here and there - could you take a look?
I still have a feeling that we are missing basic, general overview what this feature does. It is easy to understand for us, but when reading docs it seems we go right away into how to use it and approaches there are. But the introduction is a bit laconic 🤔 WDYT? Maybe we could expand it somehow?
### Interval approach | ||
```js | ||
var editor = CKEDITOR.instances[ 'editorName' ]; | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mention here that getting editor ref should be done on instanceReady
event. Because when this code is called before editor is created it will fail AFAIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you can grab an instance like that, but need to wait for instanceReady
anyway to use API. Here, I just want to point out that the old
way of creating an editor may return null
whereas the object might be returned in the old code.
But, yes - I will mention that :)
One more thing I forgot to mention during review 🙈 This PR relates to changes in the upcoming CKEditor 4 major so should target |
fba74b8
to
b42ba29
Compare
…-success' warning codes.
b42ba29
to
f8a9cfe
Compare
The rebasing was kind of painful... So I decided to create another PR but saving commits from this one: #364. Sorry about that. |
Added a short article explaining in practice, what is the difference between two options in delayed editor creation.
Closes ckeditor/ckeditor4#4553