Integration with LinkIt using an Anchor Link Matcher plugin for LinkIt to use the same drupal link core for CKEditor

Created on 4 April 2018, over 6 years ago
Updated 16 September 2024, 2 months ago

Problem/Motivation

When using this module with Linkit, I've noticed that the URL and Anchor fields do not leverage the autocomplete capability provided by Linkit.

I thought this would be a useful feature since if this is meant to improve the core CKEditor linking feature we should consider keeping it in sync with all the other contribs developed to enhance the link dialog box.

Proposed resolution

Remaining tasks

  • β˜‘ File an issue
  • ☐ Addition/Change/Update/Fix
  • ☐ Testing to ensure no regression
  • ☐ Automated unit/functional testing coverage
  • ☐ Documentation
  • ☐ Code review by maintainers
  • ☐ Full testing and approval
  • ☐ Credit contributors
  • ☐ Review with the product owner
  • ☐ Update Release Notes
  • ☐ Release

User interface changes

β†’

β†’

API changes

  • None

Data model changes

  • None
✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States velociraptor4774 Fort Worth, TX

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan
  • πŸ‡«πŸ‡·France egruel

    Hello
    I recently updated my Drupal 9.5.11 to 10.2.3.
    In this situation, I was forced to update Linkit to version 6.1.2.
    So far, I have used patch #12 ✨ Integration with LinkIt using an Anchor Link Matcher plugin for LinkIt to use the same drupal link core for CKEditor Active using Linkit version 5.0.0.

    But following the Linkit update, it no longer worked because of drupal_get_path() which is deprecated in D10 and a JS error when you attach an element to linkit.autocompleteeteete.

    I think there is a problem with linkit.autocomplete that applies this feature on fields with the class 'form-linkit-autocomplete' but this class is not added by linkit directly, and I find it rather strange that it is anchor link that adds this class via the patch.

    In ckeditor5, it seems that Linkitaautomatically adds this class to the initialization of the autcomplete, but not to ckeditor4.

    So I’ll reroll the patch. Maybe it will be useful to someone else, or reopen the discussion on this integration.

  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    It looks like ✨ Add better support for linking to anchors Postponed: needs info in LinkIt's issue queue is getting close. Should this be closed as "won't fix" in favor of focusing efforts and testing there?

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    Yes, Michael.
    Thanks, for following up on the issue.

  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    Retracting my comment #49. Sorry for the confusion.

    The LinkIt issue ✨ Add better support for linking to anchors Postponed: needs info I referenced is only about ensuring LinkIt will work correctly when a fragment is appended to a link to another node (e.g. /node/5#foo).

    This issue is augmenting the LinkIt dialog with a list of on-page anchors via the custom CKEditor Anchor link matcher (which would be nice to have!).

    Unfortunately, in a quick test it doesn't quite seem to be working. When I begin a link with #, the 'Anchor links (within the same page)' list appears, but no anchors appear β€” just a single blank entry. Screenshot below.

  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    The above is based on the patch from #48, LinkIt 6.1.4 and Drupal 10.3.2.

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan
Production build 0.71.5 2024