Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from P to DIV #7

Open
zipwiz opened this issue Apr 14, 2020 · 1 comment
Open

Switch from P to DIV #7

zipwiz opened this issue Apr 14, 2020 · 1 comment

Comments

@zipwiz
Copy link
Contributor

zipwiz commented Apr 14, 2020

This is a major one: Actually the HTML "<p>" seems to match the RTF "/par", but it doesn't very well. A very much better match is the HTML "<div>":

  • As the RTF /par it is a vertically sequential block element by nature which optionally can be forced to be arranged side-by-side, just like Word paragraphs are arranged when they form a "table" (which in the very beginning with Word for DOS 4.0 / 5.0 it simply was).

  • As the RTF /par it is highly customizable by CSS, and nearly every "paragraph formatting" can be applied to it -- but not to HTML "<p>".

There are some RTF "paragraph formattings" which simply cannot be transformed to HTML, like horizontal tabulator positions. This cannot be overcome by using DIV of course. But first-line indentation (as an example) would be possible with CSS. This in turn would enable simple bulleted lists.

Also, when introducing "real paragraph formatting" with HTML, the "HTML writer" must be refactored heavily. I think that it is not that simple as with formatting characters. But it may be worthwhile the experiment. Especially when it comes to "detecting RTF structures which should be transformed into special HTML structures" (like bulleted lists transformed into "<ul>" elements containing mutiple "<li>") much more sophistication is required I think.

@zipwiz
Copy link
Contributor Author

zipwiz commented Apr 14, 2020

(Also with this I am afraid I cannot really help in the near future.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant