Skip to main content

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

Hi Justy:
Could you let us know which codeEdit version you are using? Could you also tell us how you dynamically create the second editor? If you could provide an html file that can reproduce your issue, it will help us narrowing down the cause.

Thanks,
Libing



From:        Justin Robinson <unclejust@xxxxxxxxxxxxx>
To:        "orion-dev@xxxxxxxxxxx" <orion-dev@xxxxxxxxxxx>
Date:        05/20/2016 05:19 AM
Subject:        [orion-dev] Trying to dynamically add/remove a code editor on a page
Sent by:        orion-dev-bounces@xxxxxxxxxxx




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_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top