Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] Trying to dynamically add/remove a code editor on a page

Hi,

I'm running into an issue with trying to create more than one editor on the same page. I'm creating a widget for my project that dynamically adds and removes an editor on the page.

The first time I add the editor, the codeEdit.create promise resolves fine and I can create the editor, but the second time I try the same code the codeEdit.create promise rejects with the following exception:

 TypeError: Cannot read property 'overwriteKeyBindings' of undefined
    at Object.keyBindingFactory [as _keyBindingFactory] (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:42505:19)
    at Object.objects.mixin.install (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:27882:25)
    at Object.EditorView.create (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:42734:16)
    at EditorSetupHelper.objects.mixin.createEditor (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:42892:20)
    at CodeEdit.<anonymous> (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:43516:26)
    at settleDeferred (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:4265:28)
    at notify (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:4339:18)
    at MutationObserver.run (https://localhost:2443/js/lib/orion/code_edit/built-codeEdit-amd.js:4223:13)

Sorry, I've only just signed up to this mailing list - what's the best way to record this problem or send you a repro?

Thanks
Justy

Back to the top