Opened 13 years ago
Closed 13 years ago
#8853 closed Bug (invalid)
Config through API fails for multiple instances / only works first time
Reported by: | patricks | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.2 |
Keywords: | Cc: |
Description
It seems that the API has problems dealing with the configuration of multiple instances when they are created one by one. Only the first instance will properly initialize according to the config that is set.
I've just built a quick testcase: Two textareas are replaced by code(id) on click. the API should take the text area's size and set the toolbar-expansion to false.
Problem: no matter in what sequence you click on the two init-links, the SECOND intance of the two will always show up with full width and an open toolbar (>FAIL).
this happens in all current browsers.
Attachments (1)
Change History (2)
Changed 13 years ago by
Attachment: | testcase.zip added |
---|
comment:1 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
This is invalid.
In the first case it works because when the CKEDITOR.replace call returns the instance still hasn't finished initializing and by luck you can change its properties before they are used, but the second time it's much quicker so it's initialized before you change its config object so your changes aren't used.
The proper way to do it is to pass a config object in the replace call http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.replace
testcase