The anchor tag shifts to the end of the paragraph

Created on 25 October 2023, over 1 year ago
Updated 11 December 2023, over 1 year ago

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.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇩Bangladesh jonline

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jonline
  • 🇨🇦Canada dylan donkersgoed London, Ontario

    @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).

  • Status changed to Postponed: needs info over 1 year ago
  • 🇳🇿New Zealand klidifia

    I am experiencing something and wondering if related:

    Could someone please attempt to replicate this:
    - Create a page with body "test"
    - Highlight that text and use the anchor link button and give that an anchor name of "test"
    - Save page
    - Re-edit page

    Markup is:

    <p>
        <a class="ck-anchor" id="test">test</a>
    </p>

    - Position cursor at the end of the word "test" and note that an extra anchor link appears at the end
    - Position cursor at the start of the word "test" and note that an extra anchor link appears at the start

    - Highlight the word "test" and click the Unanchor button
    - Position the cursor anywhere within or around the word "test" and notice that an anchor appears

    Viewing the source after this, we have an anchor without an ID, which we cannot get rid of:

    <p>
        <a class="ck-anchor">test</a>
    </p>
  • Status changed to Active over 1 year ago
Production build 0.71.5 2024