English 中文(简体)
Templated HTML Editor
原标题:

I m looking for a HTML editor that kinda supports templated editing or live snippets or something like that.

Background: I m working on a website for a friend. As there are no specifications what the webspace/webserver can or can t do, I decided to make it a pure HTML/CSS page, or rather 10 of them. I wrote a template, copied it 10 times and edited the content. And guess what, the template has to be changed.

Therefore I m looking for a (HTML-)editor that has some kind of live template system where I can edit the content in as it where plain text and then save the project into the 10 pure HTML/CSS files.

I thought about using PHP (the only script language I ve some knowledge in), but writing the underlying template script would cost me enough time that I could change all files by hand. I m not that familiar with AJAX to know if there s a way to load content from another file. If so, this would be an option if there already is a script. With Webdeveloper (firefox extension) I could save the generated source code as HTML/CSS.

Thanks in advance

Edit: any hints how to do this without an editor are welcome

Edit2: In my mind the tool looks like a plain old text editor like SciTe, but capable of editing multiple files simultaneously in the same text area, so it looks like editing one ordinary file, but actually it s a whole bunch of files.

最佳回答

Dreamweaver will do this for you, it s had HTML templating of the type your describe built in from very early versions (because from how you phrase the question I do not think you re thinking along the lines of a PHP templating engine such as Smarty, but some sort of HTML layout formating)

Although I regularly look around for Dreamweaver replacements, and I ve certainly been impressed by Aptana, I still tend to use Dreamweaver in my development stack simply because whereas I can compensate for some of the more coding-orientated features it misses, I find the WYSIWYG nature of the editor invaluable.

问题回答

I would have used a template engine. I wrote a post about a dead simple script using the Dwoo template engine and mod_rewrite, where I am taking the uri and loading the forrect data and template based on that. You should be able to get it running in a few minutes.

Maybe I am way off on this, but why don t you look into an Open Source Content Management System (PHP/MYSQL)? There are MANY light systems that are not like Drupal, Joomla (if you do not want the big bulk of those CMS s).

There are even a few good ones for light web design that are flat file driven.

That would be my suggestion, at least if not for this project, look into it for future projects.

Here is an example of a great micro CMS that would seem to fit the bill for what you are doing: http://www.mini-print.com/





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签