Use valid HTML as richtext format
For now, tryton uses a format quite close to HTML but still not valid.
In order to develop the richtext widget on sao, we must converge to a common standard for both client. I think the best is a minimal subset of the HTML to support the current features matching what browsers generate using the execCommand.
- For alignment: we use <div align="...">...</div>
So we will have one div per line (browser doesn't necessary create one for the first line).
- For bold, underline and italic: we use <b> <u> and <i> tags
- For the size, we use the <font size="1-7">...</font>
- For the font family, we use <font face="...">...</font> and restrict to common families ('normal', 'sans', 'serif', 'monospace').
- For the foreground color: we use <font color="#123">...</font>
Unfortunately there is no HTML standard for the background color except via css.
I think we can just drop this feature for now until someone propose a patch.
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
example_copy.odt | @resteve | 2015-09-15 11:11:27.149000 UTC | application/vnd.oasis.opendocument.text |
copy_paste_html.png | @resteve | 2015-09-15 13:20:41.761000 UTC | image/png |