Does not work with views

Created on 2 January 2025, 3 months ago

Problem/Motivation

Not able to create the link with views, the button does not appear.

Works in a block.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇫🇮Finland anaconda777

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

Comments & Activities

  • Issue created by @anaconda777
  • 🇺🇸United States puffoon

    A few more details to reproduce the situation might help.

    If you rewrite a field to add the class "cp-to-clip" it works fine.

    Please let me know how to reproduce your situation.

    Thank you

  • 🇫🇮Finland anaconda777

    Hi,

    I tried couple of different view and different ways:
    1. to existing views a new field global custom text.
    I wrote something in the text area
    "output this field as a custom link"
    link path: /
    link class cp-to-clip
    save
    does not work, the extra tags does not appear in the html source code, the link does not copy.

    added to views header a custom text and

    copy this text

    and then finally tried to a views field and added in the style settings- >customize field html and created new css class in a div
    cp-to-clip

    Only way I can make the copy icon appear and the link to copy smt is using a block and write there in the text field

    copy this text
  • 🇺🇸United States puffoon

    While adding custom text to the header you would have to ensure that the tags are not stripped off, as is usually the case unless you specify that the text should be unfiltered.

    For the views field: adding a Style settings -> Customize field HTML with a DIV -> Add HTML class cp-to-clip works; i.e. the copy button appears and text is copied.

  • 🇺🇸United States puffoon

    As far as I can see this module behaves as expected with views. If otherwise, please let me know with details. Thank you.

    As long as the displayed page contains the enclosing tag with the cp-to-clip class this should work.

  • 🇺🇸United States puffoon

    Closing this as there is no response from the reporter of this issue. The module works as expected. If the class exists in on the page the javascript adds the link and the copying function works.

Production build 0.71.5 2024