I want to build a simple online editor like plunker. Does anyone know how to accomplish the live preview, once several files (.html
, .css
, .js
, .json
) have been uploaded?
Taking JSBin as example, there are only 1 html text, 1 css text and 1 js text, so it is simple: we just need to construct one complete html file from these texts and use Document.write().
However, how do editors such as plunker
, brackets
, vscode
do live preview? Do they also construct one complete file by themselves or they use some third-party tools?