1. 程式人生 > >Ask HN: How would you approach creating modular HTML templates for non-techies?

Ask HN: How would you approach creating modular HTML templates for non-techies?

I am an intern developer at a company and I've been asked to put together some templates that can be used within their CMS to create basic pages. The system basically just accepts content in raw HTML form - there is external CSS but for bureaucratic reasons I can't change it so everything will have to be inline.

My current plan is just to create copy-pastable 'blocks' - such as one with straight text, one with an image on the left and text on the right, one that's the reverse, and one that's a bullet-pointed list. My coworkers who'd be using the system are technically competent enough to paste them within a master template and 'fill in the blanks', though I'd probably have a simple script that takes the content of a hidden <pre> tag and formats it as a series of paragraphs within each text section.

I feel like this is a fairly crude way to do things, however, so I wanted to ask the more experienced developers of HN whether there's a better approach that I've overlooked?