Review main Merged

81266[BUGFIX] Use CKEditor5 data model as source for link-browser

Benjamin Franzke CR +2 V +2 Normal +49 −23 updated 10/02/23, 10:43

Commit message

Do not operate on the view model, but always read link attributes
from the data model. Do this to avoid conflicts with the (pre)view
representation of the contents which may not represent the plain data 1:1.

Examples:

 * CKEditor5 renderes phone links in the editor preview as `href="#"`.
   That means `href` must not be parsed from the link (#101303).
 * Link classes may be alterated with stateful style classes
   and had therefore be filtered server side previously (#101959).
   This is workaround could now be removed.

To make it clear that the result of getSelectedLinkElement() must
not be used as data source, the (more) correct return type
`ViewAttributeElement` is defined now (upstream does so too).

Note that CKEditor5 uses commands somewhat like data-models,
where the data is to be collected in the refresh() method.
This is why we process all link-related registered attribute in there,
(based on the CKEditor5 schema).

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 3