-
Notifications
You must be signed in to change notification settings - Fork 1
Description
In certain situations the hallojs editor component gets unusable over time. over time means with multiple invocations on the same dom-tree.
the situation for my application is
a list, that the user can select from
a editor div that contains the data displayed/modified to the user
when a list-item is clicked, the editor-div is filled with the data associated to the list and the editor has to be configured to be minimal (undo/redo only) or full (with more plugins)
essentially hallo() is called multiple times on the same dom-node:
for (i=0;i<100;i++)
$('#editordiv').hallo(myconfiguration);after this, the editor component is painfully slow, it takes multiple seconds for a single typed character to appear
the current work-arround is to remove the node that hallo uses before reassigning the new configuration
for (i=0;i<100;i++){
var parent = $('#editordiv').parent();
$('#editordiv').remove();
parent.append('<div id="editordiv"></div>');
$('#editordiv').hallo(myconfiguration);
}please review
https://github.com/git-j/hallo/blob/master/examples/test_multiuse.html