major
nice-to-have
minor
major
#25816
TL-Doc: Cut&Paste von Object-Links ist im Ergebnis nicht derselbe Objekt-Link
When you copy and paste part of a page into another page, the internal structure of the link changes. The original reads
class="tlObject" href="?type=Page&uuid=97ca436f-3646-4f01-b6a2-6947a2d8989a"
In a copy (if you copied from the read-only view), however:
href="https://dev.top-logic.com/documentation/servlet/LayoutServlet/w17ded8dbee0e71a1-a193dc737c122a77?type=Page&uuid=97ca436f-3646-4f01-b6a2-6947a2d8989a"
A link like this is problematic at best, since exporting it as a PDF would also generate an external link.
Because of all this confusion, we now have a lot of strange links in the database—some with ?type=Page, or page=<page-name>, or... The database will need to be cleaned up afterward and corrected via an export-re-import process.
Improvement
To preserve the `tlObject` class , a `pasteFilter` was configured to allow classes within `a` tags. Additionally, the `paste` event is now intercepted, and the link in the `href ` is shortened accordingly.
Test
Copy a TLObject link (in both read and edit views) and paste it into a page. The HTML code must be the same. Note that in edit mode, in addition to `href`, there is also a ` data-cke-saved-href` attribute, which disappears when switching to read mode. This is a mechanism of the editor, and this attribute must contain the same link as `href`.