Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
In case of Multiple divs Alloy Editor doesn't focus on currently selected div in case of Dropdown #515
I have a sample code that creates a new div on click and appends or should I say bind it with an Alloyeditor instance. Problem I am having is that instance created this way works fine for first selected and created div, but when second div is selected "bold" "underline" etc buttons work properly. except in case of Dropdown list item selection, it doesn't work properly, i.e on click of dropdown list item in second div, first div remains selected and selection is applied on selected text but in previous instance. As more instances are created bold and Underline etc. buttons also don't work properly.
Here is my code:
1). Does Alloyeditor provide multiple instance support.?
Let me answer to these questions one by one:
Yes, it does.
About these two questions, please see the code below:
This should do what you want - the instances are created and deleted on the fly.
Now, about the issue with the duplicated status of Fonts and FontSize buttons:
and download the FontSize plugin, as it is shown in our guides.
Here is the issue:
From what I'm seeing, we assumed the CKEditor plugins wouldn't have state, but unfortunately, they do :(
The methods we invoke: