tencent cloud

Feedback

Clipboard

Last updated: 2024-11-21 18:48:11

    setClipboardData

    This API is used via wx.setClipboardData(Object object).
    Feature Description: Sets the content of the system clipboard. For individual users, it should not be invoked more than once per second.
    Parameter and Description: Object.
    Attribute
    Type
    Default value
    Required
    Description
    data
    string
    -
    Yes
    Clipboard content
    success
    function
    -
    No
    Callback Function of Successful Interface Call
    fail
    function
    -
    No
    Callback Function of Failing Interface Call
    complete
    function
    -
    No
    Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations)
    Sample Code
    wx.setClipboardData({
    data: 'data',
    success(res) {
    wx.getClipboardData({
    success(res) {
    console.log(res.data) // data
    }
    })
    }
    })

    getClipboardData

    This API is used via wx.getClipboardData(Object object).
    Feature Description: Gets the content of the system clipboard. For individual users, the invocation does not exceed 1 time per second.
    Parameter and Description: Object.
    Attribute
    Type
    Default value
    Required
    Description
    success
    function
    -
    No
    Callback Function of Successful Interface Call
    fail
    function
    -
    No
    Callback Function of Failing Interface Call
    complete
    function
    -
    No
    Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations)
    object.success callback function: Object.
    Attribute
    Type
    Description
    data
    string
    Clipboard content
    Sample Code
    wx.getClipboardData({
    success(res) {
    console.log(res.data)
    }
    })
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support