[Pmwiki-users] Re: %class=something% (was Re: Extending ...)
Andres Yver
yver
Wed Mar 3 08:12:11 CST 2004
On Tuesday, March 2, 2004, at 11:54 PM,
Pmwiki-users-request at pmichaud.com wrote:
> I'm not intending to pick on Andres Yver here, but his message at
> http://pmichaud.com/pipermail/pmwiki-users_pmichaud.com/2004-February/
> 003172.html
> exactly illustrates this principle, and he's hardly a new author. :-)
lol!
I glanced at the markup on PmWiki.EditQuickReference and thought it
was regexps!
Seriously though, markup needs to look simple, and it's rules must be
easy to remember.
That's why we were talking about keeping div and span functionality
within %style%, and having a simple ruleset.
Nathan Jones comments:
> Just having a closing % is not enough to make a div:
>
> %style% If there is a closing tag here;% then you want a span, since
> you
> wouldn't want a line break (caused by div) in the middle.
Yes, a span. You'd need a closing % at the end of the sentence or
paragraph(s) to make a div.
>
> %style% Should this%
> be a span or a div?
same as first example.
> So, perhaps it would need to be a % on a line by itself:
>
> %style% This a block that will
> be enclosed in a <div>
> %
That makes sense, and it helps people think in terms of block style
attributes enclosing an area of the page. You could extend this to the
opening style tag as well to be consistent. It's easier to read your
content when it's not on the same line as your markup.
%style=.richard%
my content goes here.
%
generates a div of class richard.
how do we define the classes? We'd need an stylesheet sidebar page
which contained some predefined classes and also those classes named in
the document. Editing the values for the class changes the css for that
document.
Stylesheets are familiar to people that have worked with word
processors and graphics programs.
To get it closer to wysiwyg editing, you could have the stylesheet page
preview the document at each class edit.
Perhaps we could toggle edit mode between markup and preview. You add
the tags to the markup, toggle to preview, edit the styles.
How about user highlighting of content text and clicking on an existing
predefined style like bold or on a user defined style like richard to
set the appropriate markup?
Site administrators could define set styles and disable user editing of
the stylesheet if they wanted to maintain, say, a corporate look.
Standard disclaimer applies about not being a programmer, no idea
whether it will hopelessly bloat the code, slow things down, eat gobs
of memory, otherwise wreak havoc, etc.
andres
More information about the pmwiki-users
mailing list