Skip to content

editor gets slow over time #8

@git-j

Description

@git-j

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions