Copy Text functionality

Certified Lead Developer

Hi,

Is it possible to configure a feature as below:

A button is displayed next to a Non-editable text field.

On click of the button, the text must be copied into the clipboard and the user can paste it with a simple Ctrl+V (Windows)


Regards,

Sunil Zacharia

  Discussion posts and replies are publicly visible

Parents
  • Hi Sunil,

    I don't think it is possible using ctrl+v to copy text.

    You can use it like this

    1. Click on copy button to copy text on clipboard

    2. Than click on paste button to copy text in respective text field.

    Code:

    load(
    local!a,
    local!b,
    {
    a!columnsLayout(
    columns:{
    a!columnLayout(
    contents: {
    a!richTextDisplayField(
    value:{
    a!richTextItem(
    text:"Test "
    )

    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!imageField(
    images:{
    a!documentImage(
    document:226665,
    link:a!dynamicLink(
    saveInto:a!save(
    local!a,"Test"
    )
    )
    )
    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),
    }
    ),
    a!columnsLayout(
    columns:{
    a!columnLayout(
    contents: {
    a!textField(
    value:local!b,
    saveInto:local!b
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!imageField(
    images:{
    a!documentImage(
    document:226664,
    link:a!dynamicLink(
    saveInto:a!save(
    local!b,local!a
    )
    )
    )
    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),
    }
    )
    }
    )

     

    Thanks

Reply
  • Hi Sunil,

    I don't think it is possible using ctrl+v to copy text.

    You can use it like this

    1. Click on copy button to copy text on clipboard

    2. Than click on paste button to copy text in respective text field.

    Code:

    load(
    local!a,
    local!b,
    {
    a!columnsLayout(
    columns:{
    a!columnLayout(
    contents: {
    a!richTextDisplayField(
    value:{
    a!richTextItem(
    text:"Test "
    )

    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!imageField(
    images:{
    a!documentImage(
    document:226665,
    link:a!dynamicLink(
    saveInto:a!save(
    local!a,"Test"
    )
    )
    )
    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),
    }
    ),
    a!columnsLayout(
    columns:{
    a!columnLayout(
    contents: {
    a!textField(
    value:local!b,
    saveInto:local!b
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!imageField(
    images:{
    a!documentImage(
    document:226664,
    link:a!dynamicLink(
    saveInto:a!save(
    local!b,local!a
    )
    )
    )
    }
    )


    }
    ),
    a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),a!columnLayout(
    contents: {
    a!textField(readOnly: true())


    }
    ),
    }
    )
    }
    )

     

    Thanks

Children
No Data