Load some Monaco editors after ajax request [closed]

106
January 23, 2020, at 2:40 PM
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 2 hours ago.

Short: how to create more editors on one page when their container and data are loaded with AJAX after page load

Monaco editor needs a container div and a script with parameters like source code, etc. to create editor in the div. But my page main content changes with AJAX request, and in the answer, there are multiple containers with source codes which should be turned to editors. The problem is, that there is an unknown number of containers, and their content (the code) is going from the answer as well, so it cannot be loaded with js, as AJAX run on user event after the page loaded. Could you give me some ideas to solve this problem?

READ ALSO
External JS file isn't rendering url template tag properly

External JS file isn't rendering url template tag properly

I've created the following JS script in order to display either a link to logout the user or send them to the login page whether they are authenticated or not via {{useris_authenticated}}

90
Check if test failed in 'afterEach' of Jest without jasmine

Check if test failed in 'afterEach' of Jest without jasmine

I want to be able to check whether one my Jest tests succeeded or failedThere is another SO question on this topic, but the solution uses Jasmine, is kind hacky, and is by no means guaranteed to continue working with future versions of Jasmine or Jest

87
refactor map, reduce and double for loop - javascript es6

refactor map, reduce and double for loop - javascript es6

I have a JavaScript object, lets say parentObj

101
get multiple count selected

get multiple count selected

I need to count teacher_id selected

109