7f9de46688
Currently the current selection is always requested as HTML by the browser, and then we ask the browser to convert it to plain text. The problem is that e.g. Writer can produce much better plain text from its model, compared to the plain text by the browser, e.g. bullet characters for bullet points. Fix the problem by: - CanvasTileLayer.js, _onTextSelectionMsg(): requesting both HTML and plain text. Use ',' as a separator, as that's already established, e.g. the HTTP Accept header does that already - Switching the textselectioncontent protocol message from just HTML to JSON that contains both HTML and plain text. This is produced in ChildSession::getTextSelection() and parsed in CanvasTileLayer.js, _onMessage() - Clipboard.js, setTextSelectionHTML(): allowing setting both HTML and plain text. - ClientSession::postProcessCopyPayload(): knowing if the content to be processed is HTML-in-JSON or just HTML, do additional escaping in the JSON / textselectioncontent case, but leave the other clipboardcontent case unchanged. So far this only handles the simple case, the behavior for complex selections are left unchanged for now. The payload is also unchanged when a single format is requested, as many tests depend on test. Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: I2fe1378a8d50b7901ac9e808eb78858cd8ff8575 |
||
---|---|---|
.. | ||
desktop | ||
idle/calc | ||
mobile | ||
multiuser |