Question: Some friends and I want to develop a web-based code editor. Kind of like `Visual Studio Code` but as a web-app and more plugin based. Right now we're unsure about our front-end architecture. We would like to use a framework like `Angular` and not have to develop in plain `html` and `js` because we think a professional framework would turn out to be more efficient.

Now because we want our editor to be heavily plugin based we need our frontend to be quite dynamic and allow the client to extend the application at runtime.

We're afraid of choosing the wrong architecture and then having to start over again, so we wanted to ask you guys if you have suggestions or tips.

If you have any further questions regarding the project feel free to ask me.

Answer: 
Ever heard of [user scripts](https://www.google.com/search?q=user+scripts&rlz=1C1CHBF_enUS752US752&oq=user+scripts&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8)? Browser plugins like [Grease Monkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) allow users to run their own javascript over the websites they visit on their own computers. It brilliantly side steps the "untrusted code" problem by letting people run their own code on their own computer. 

What you'd need to do is design your web-app to provide the basic functionality and make it easily extensible so others can substitute your functions with theirs.

You can get the ball rolling by writing and publishing your own user scripts to supplement your basic web app.
I have done exactly this for my company's product. The web app is .NET Core Web API and Angular. The back-end extension point is a service implementing a contract, with some methods able to return HTML that is rendered in an IFRAME. Within the service methods, the plug-in writer can do whatever they like to interact with the app or other services, and they can create HTML using whatever templating engine suits them. Cross-window communication is via postMessage API. I'm not saying it's the best design ever, but it works for us. I have yet to see a plug-in architecture for Angular due to its build process, and I doubt one will ever exist.