Problem/Motivation

The anchor tag shifts to the end of the paragraph when re-editing RTE

Steps to reproduce

1. Anchor is added in CKEditor within the paragraph
2. Viewing correctly on the website after publishing
3. When the user returns to edit the text, the anchor moves to the end of the paragraph.
4. When the page is published again, it moves the code to the end of the website as well.

Comments

jonline created an issue. See original summary.

dylan donkersgoed’s picture

@matthiasm Are you using the latest version of the module and library? A PR from ok-steve that fixed this issue was merged in at the start of this month.

Some users have reported the node package not being updated on composer update in some situations. Please double check you have the 0.3.0 version of the JS package (or newer, I'll likely tag another version soon).

dylan donkersgoed’s picture

Status: Needs work » Postponed (maintainer needs more info)
klidifia’s picture

Sorry thought I could repro after a node save, but cannot on a fresh install.

klidifia’s picture

Status: Postponed (maintainer needs more info) » Active

Can reproduce when class is added to the a tag within: CKEditor 5 plugin settings -- Source editing -- Manually editable HTML tags

I'm not sure if it's this exact issue "anchor shifting to the end", but see what happens after a page is saved and subsequently edited with an anchor link:

- Anchor and markup appear normal, e.g. <a class="ck-anchor" id="test">test</a>
- (After a save/edit) -- clicking at either the start or the end of anchor link will visually insert another anchor symbol
- -- clicking within the anchor and clicking the remove anchor button visually removes it at the start, but then clicking anywhere within the pre-existing anchor adds it visually back -- markup remains: <a class="ck-anchor">test</a>

rajab natshah’s picture

Status: Active » Closed (outdated)