http://www.labs4.com/htmleditbox/2.0/demo.php
Mark wrote, On 2003/Jul/30 11:11 AM:
But isn't this just defining your own version of something like bbcode? And wouldn't you be better off using bbcode in that case, when there are plenty of classes for parsing it already out there?
You could even edit the parsers to limit the set of tags available to your users.
--- bill <[EMAIL PROTECTED]> wrote:
I'd recommend starting simple.
Paragraph breaks are two carriage returns (Enter, Enter). Give the writers some ability to do bold, italic, etc. by using something that isn't html (I don't store html tags in text fields). For example +b+would make this bold-b-, or +i+would make this italic-i-. You can also have +c+ to center -c- and could do the same thing with +16+sizes-16- and +red+colors-red-
Then, when displaying the text, translate what they have into html. +b+ becomes <b> and -b- becomes </b>. +c+ become <div align="center"> and -c- become </div>, etc.
Images are a bit different. I let them specify the content and order of images (uploaded with the content), but I have the script align them where appropriate (count the number of paragraphs, insert the images in between appropriately, alternating sides [right, left, right, etc.]).
I find these simple things work for two reasons. First, authors are used to editors doing things with their text; think of a magazine or newspaper editing, cutting, putting in pictures, etc. Second, authors don't want to learn html any more than they want to learn page layout programs. Give them some basic formatting stuff and add more as needed.
kind regards,
bill
Justin French wrote:
Hi all,
I've been writing CMS's for years now, and at the moment, I find
myself
looking for some breakthrough, or at the very least, a change in
the
way I do things.
Anyone can write a CMS to manage simple articles with a data
structure
like:
id author date_written heading body keywords description publish_date expires_date
But, it still requires the writer to know a little mark-up (p,b,h1,h2,i,a,img,etc) in order to create an article with
multiple
paragraphs, sections, headings, images, etc, with well
structured,
valid mark-up.
So, I've started thinking about how this can be tackled.
Idea #1 was to have an unlimited number of 'blocks' or 'objects' *related* to an article, resulting in two tables:
ARTICLE id, author, date, title, keywords, desc, etc
BLOCKS id, articleid, heading, content, order, etc
But the reality is that different types of pages will require
different
types of blocks (some with headings, some with images, some with captions, etc). On the surface, this seems either too big to
tackle,
or too complex to expect the writer/contributor to grasp.
I'd be really interested in hearing how any one else is tackling
this
stuff, even if it is only remotely related to PHP.
Justin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
===== Mark Weinstock [EMAIL PROTECTED] *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. ***************************************
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php