One of the nice features of text editors is table formatting. Think
MS Word and its Table Autoformat dialog. It's very easy to implement
that in BlueGriffon... Hehe 
Keyword - table
03Oct
Speaking of tables
16:04 - By BlueGriffon - Thinking at loud
01Oct
CSS rules only...
10:20 - By BlueGriffon - Progress
One thing that has always puzzled me in existing HTML+CSS wysiwyg
editors is
the impossibility to create a table in a really strict markup context.
I mean a table with no presentational attributes at all,
no inline styles at all and only a class and/or ID or the table itself.
Although almost nobody writes such tables, it's fairly simple for the
most common attributes. I suspect it's for three reasons only : first,
web sites use a lot of borderless tables ; second, existing editors
don't let you do that ; third, most people don't understand CSS well
enough. Let's suppose our table has ID mytable.
Then we have the following equivalences:
- for the
borderattribute on the<table>element if the value if not "0".#mytable {
border: outset <value_of_the_attribute>px;
}
#mytable > * > tr > td,
#mytable > * > tr > th {
border: inset 1px;
} - for the
cellspacingattribute on the<table>element#mytable {
border-spacing: <value_of_the_attribute>px;
} - for the
cellpaddingattribute on the<table>element#mytable > * > tr > td,
#mytable > * > tr > th {
padding: <value_of_the_attribute>px;
} - the
rulesandframeattributes on thetableelement is only a little bit more complex but it's a non-issue to map such an attribute to CSS rules. - the
width,alignandvalignattributes on<table>and descendants of<table>are also a non-issue with a trivial mapping to their CSS counterparts - for the deprecated
alignattribute on<table>, a combination of 'margin-left: auto' and/or 'margin-right: auto'
In other terms, it's not a problem implementing an editor that provides a user wishing to insert a table with the following choice : "HTML attributes only", "Inline styles when possible", "Style rules or inline styles when possible". As a matter of fact, it's already implemented in BlueGriffon. Please don't focus on the UI since it's absolutely not final, it's even sure it's going to evolve a lot for instance to let the user reuse existing CSS style rules instead of creating new ones.









