javascript - (Reactjs) Persist html file with styling to database -


i working on react app allows users drag , drop ui elements generate template. @ end of process, have html preview of template displayed user. best way save html (along styling) server ? few approaches tried:

  1. convert html string , persist. makes difficult import these templates @ later point in time (and extract react components out of it)
  2. store html , styling data in json format. there store (all margins, padding values etc.)

any ideas?

edit : reason asking because there might totally different way of storing templates server side might unaware of. example, store .docx files templates. provide easy way of representing (and visualising) styling info of document. , convenient save docx file, parse through html , extract styling info json. doing away .docx because of business limitations.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -