JaxEdit is an online LaTeX editor with live preview. You could try it at https://zohooo.github.io/jaxedit.
The JaxEdit project is separated as two parts: one is the LaTeX editor which is under GNU Lesser General Public License, and the other is the LaTeX typesetter named TypeJax, which is under The MIT License.
If you only need to display your LaTeX document in web pages, you could use TypeJax together with MathJax.