Opened 6 years ago

Closed 6 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)

testcase.zip (971 bytes) - added by patricks 6 years ago.
testcase

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by patricks

Attachment: testcase.zip added

testcase

comment:1 Changed 6 years ago by Alfonso Martínez de Lizarrondo

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy