Reputation: 7141
i'm making a website for someone who is not particularly well acquainted with html and i want them to be able to edit the content of their webpage just from a blank text/html file (or easier method),
i'm wondering if there is anyway i can just have a text document but save it as a html which i could load within <p></p>
tags
for example: maindocument.html
<html>
<body>
<p id="text">....[someway of getting text from textdocument.html (or .txt)]....</p>
</body>
</html>
textdocument.html (or.txt)
"text to go within p tags"
you can do this with css style sheets and scripts so is there a way to do this with basic html?
Upvotes: 1
Views: 49
Reputation: 107
If the web server is running Apache you could use SSI. The files will need to be in .shtm or .shtml format.
Then all you do is
<p>
<!--#include virtual="paragraphs.txt" -->
</p>
I'd usually just use PHP includes though.
Upvotes: 2
Reputation: 10675
The simplest way is to use server-side includes if they are available on your server: http://httpd.apache.org/docs/2.2/howto/ssi.html
Otherwise you might consider using a scripting language like PHP and include the file, like:
<?php include("textdocument.html"); ?>
Upvotes: 0
Reputation: 21694
If a .txt file is enough, I guess you could use an iframe to load it:
<iframe src="myfile.txt"></iframe>
But if you want rich editing, I'd suggest implementing a WYSIWYG editor and saving it somehow.
Upvotes: 0