clipboard 订阅
Clipboard 展开全文
Clipboard
信息
操作系统
未知
开发语言
开源协议
未知
Clipboard
Clipboard是一个用来操作系统剪切板的jQuery插件,它支持多种浏览器,在IE下使用的内置的方法,其他浏览器使用Flash的方式来处理,因此需要Flash8或者以上的版本的支持。
收起全文
精华内容
下载资源
问答
  • Clipboard

    2012-12-27 09:13:32
    Clipboard.Assign(Image1.Picture); with Image.Canvas do begin CopyMode := cmWhiteness; ARect := Rect(0, 0, Image.Width, Image.Height); CopyRect(ARect, Image.Canvas, ARect); CopyMode := cmSrcCopy;...
    unit Unit1;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, jpeg, ExtCtrls;
    
    type
      TForm1 = class(TForm)
        Image1: TImage;
        Image2: TImage;
        Cut1: TButton;
        Paste: TButton;
        procedure Cut1Click(Sender: TObject);
        procedure PasteClick(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    {$R *.dfm}
    
    procedure TForm1.Cut1Click(Sender: TObject);
    var
    
    ARect: TRect;
    
    begin
    
    Clipboard.Assign(Image1.Picture);
    
    with Image.Canvas do
    
    begin
    
    CopyMode := cmWhiteness;
    
    ARect := Rect(0, 0, Image.Width, Image.Height);
    
    CopyRect(ARect, Image.Canvas, ARect);
    
    CopyMode := cmSrcCopy;
    
    end;
    end;
    
    procedure TForm1.PasteClick(Sender: TObject);
    var
    
    Bitmap: TBitmap;
    
    begin
    
    if Clipboard.HasFormat(CF_BITMAP) then
    
    begin
    
    Bitmap := TBitmap.Create;
    
    try
    
    Bitmap.Assign(Clipboard);
    
    Image.Canvas.Draw(0, 0, Bitmap);
    
    finally
    
    Bitmap.Free;
    
    end;
    
    end;
    end;
    
    end.
    

    展开全文
  • 1Clipboard

    2018-06-04 15:18:00
    1Clipboard是一款Mac/windows平台上的剪切板版工具,1Clipboard可在PC或Mac之间分享剪切板内容的免费工具,能够排列好你所剪贴的内容,使用起来非常方便,在多台设备间同步剪贴,1Clipboard就能为你实现。...
  • Clipboard viewer

    2018-09-29 22:19:27
    Clipboard viewer 可以实时查看Windows剪贴板的数据,比如有哪些格式,包括位图。可显示位图的图形
  • clipboard复制

    2018-02-09 18:24:10
    clipboard.js,通过该js类库进行页面的复制,相关的html和js
  • import clipboard from '@/directive/clipboard/index.js' // use clipboard by v-directive export default { name: 'ClipboardDemo', directives: { clipboard }, data() { return { activeName: '...
  • clipboard.js 是一个不需要flash,将文本复制到剪贴板的插件。
  • Clipboard.rar

    2019-12-10 17:33:23
    C#实现Windows系统上剪切板(Clipboard)读写功能,不支持Linux下,或者在MacOS下使用,使用工具vs2019
  • clipboard.swf

    2016-09-21 09:56:43
    clipboard.swf
  • clipboard使用总结

    万次阅读 2020-06-22 19:32:18
    clipboard.js是一款轻量级的实现复制文本到剪贴板功能的JavaScript插件。通过该插件可以将输入框,文本域,DIV元素中的文本等文本内容复制到剪贴板中 clipboard.js支持主流的浏览器:chrome 42+; Firefox 41+; IE 9+...

    (1)介绍:

    clipboard.js是一款轻量级的实现复制文本到剪贴板功能的JavaScript插件。通过该插件可以将输入框,文本域,DIV元素中的文本等文本内容复制到剪贴板中
    clipboard.js支持主流的浏览器:chrome 42+; Firefox 41+; IE 9+; opera 29+; Safari 10+;


    (2)clipboard复印内容的方式有

    1. target复印目标内容
    2. 通过function 要复印的内容
    3. 通过属性返回复印的内容

    target复印目标内容,这里不说,就说一下function和属性的操作。

    (3)Function操作有两种:

    第一种:
    通过target的function复印内容
    通过target指定要复印的节点,这里返回舒值是‘hello’

       <button class="btn">Copy_target</button>
       <div>hello</div>
    
       <script>
       var clipboard = new Clipboard('.btn', {
       // 通过target指定要复印的节点
           target: function() {
                      return document.querySelector('div');
                 }
       });
    
       clipboard.on('success', function(e) {
           console.log(e);
       });
    
       clipboard.on('error', function(e) {
           console.log(e);
       });
       </script>
    

    第二种:

    通过text的function复印内容
    text的function指定的复印内容,这里返回‘to be or not to be’

    <button class="btn">Copy</button>
    <script>
       var clipboard = new Clipboard('.btn', {
       // 点击copy按钮,直接通过text直接返回复印的内容
           text: function() {
               return 'to be or not to be';
           }
       });
    
       clipboard.on('success', function(e) {
           console.log(e);
       });
    
       clipboard.on('error', function(e) {
           console.log(e);
    });
    

    (4)通过属性返回复印的内容

    第一种: 单节点

    通过id指定节点对象,并做为参数传送给Clipboard。这里的返回值的内容是data-clipboard-text的内容

    // 通过id获取复制data-clipboard-text的内容 
    <div id="btn" data-clipboard-text="1">
            <span>Copy</span>
    </div>
     
    <script>
        var btn = document.getElementById('btn');
        var clipboard = new Clipboard(btn);
     
        clipboard.on('success', function(e) {
            console.log(e);
        });
     
        clipboard.on('error', function(e) {
            console.log(e);
        });
    </script>
    

    第二种: 多节点

    通过class获取所有button按钮,并做为参数传送给Clipboard。每个按钮被点击时,返回值的内容是其对应的data-clipboard-text的内容,分别是1,2,3

    //   通过class注册多个button,获取data-clipboard-text的值
    <button class="btn" data-clipboard-text="1">Copy</button>
        <button class="btn" data-clipboard-text="2">Copy</button>
        <button class="btn" data-clipboard-text="3">Copy</button>
     <script>
        var clipboard = new Clipboard('.btn');
     
        clipboard.on('success', function(e) {
            console.log(e);
        });
     
        clipboard.on('error', function(e) {
            console.log(e);
        });
        </script>
    

    (5)函数和属性的兼容方式

    函数:

    //ClipboardJS.isSupported()  //--------这句为:是否兼容
    var clipboard = new Clipboard('.btn');
    //优雅降级:safari 版本号>=10,提示复制成功;否则提示需在文字选中后,手动选择“拷贝”进行复制
    clipboard.on('success', function(e) {
        alert('复制成功!')
        e.clearSelection();
    });
    clipboard.on('error', function(e) {
        alert('请选择“拷贝”进行复制!')
    //尝试去掉alert,能弹出系统的“拷贝”工具,但是需要点击两次按钮才能弹出,具体原因还不清楚,参考上图。有人说可以试一下在触发的地方写一个空点击事件, οnclick="" 因为ios不单纯支持on事件
    }); 
    

    属性:

    <img
       src="../../../../assets/images/zuop_award/copy_link.png"
          @click="copy"
          data-clipboard-action="copy"
          class="email"
          :data-clipboard-text="'mayouchen@csdn.com'"
        /> 
    
    -------------------
      copy() {
         var clipboard = new Clipboard(".email")
         // console.log(clipboard);
         clipboard.on("success", e => {
           // console.log("复制成功", e);
           Toast({
             message: "复制成功"
           })
           // 释放内存
           clipboard.destroy()
         })
         clipboard.on("error", e => {
           // 不支持复制
           Toast({
             message: "手机权限不支持复制功能"
           })
           console.log("该浏览器不支持自动复制")
           // 释放内存
           clipboard.destroy()
         })
       }
    
    展开全文
  • clipboard.js

    2019-06-10 15:26:58
    javascript:实现复制文本,APP端通过h5文件实现复制文本的功能,所需的clipboard。js文件
  • A polyfill for the asynchronous clipboard APIclipboard-polyfillMake copying on the web as easy as:clipboard.writeText("hello world");As of October 2017, this library is a polyfill for the modern Promi...

    A polyfill for the asynchronous clipboard API

    clipboard-polyfill-logo.svg

    clipboard-polyfill

    Make copying on the web as easy as:

    clipboard.writeText("hello world");

    As of October 2017, this library is a polyfill for the modern Promise-based asynchronous clipboard API.

    Why clipboard-polyfill?

    Browsers have implemented several clipboard APIs over time, and writing to the clipboard without triggering bugs in various old and current browsers is fairly tricky. In every browser that supports copying to the clipboard in some way, clipboard-polyfill attempts to act as close as possible to the async clipboard API. (Read to the end of this document for all the limitations.)

    Note: If you only need to copy text and want a super simple polyfill that gets you 80% of the way, consider using this gist.

    Get the Code

    Get the code using one of the following. If you don't know how to pick and want maximum browser compatibility, start by using "With Promise Polyfill".

    Without Promise Polyfill

    This version is smaller, but does not work in Internet Explorer unless you add your own Promise polyfill (see below).

    Download dist/clipboard-polyfill.js and include it using a

    npm install clipboard-polyfill and one of:import * as clipboard from "clipboard-polyfill"

    const clipboard = require("clipboard-polyfill");

    With Promise Polyfill

    This version works "out of the box" in all browsers that support copying to the clipboard, but is about 2.5x as large.

    Download dist/clipboard-polyfill.promise.js and include it using a

    npm install clipboard-polyfill and one of:import * as clipboard from "clipboard-polyfill/dist/clipboard-polyfill.promise"

    const clipboard = require("clipboard-polyfill/dist/clipboard-polyfill.promise");

    Which One?

    The async clipboard API design uses ES6 Promise, which is not supported in Internet Explorer. If you want the clipboard-polyfill to work in as many browsers as possible, you will need to include a polyfill for Promise. You can do this by either using the "With Promise Polyfill" version, or by using the "Without Promise Polyfill" version with a polyfill of your own choice. Recommendations include es6-promise and core-js. Instructions for how to use these polyfills are dependent on your build system and can be found in the READMEs of these libraries.

    Usage

    Plain Text

    Copy text to the clipboard (all modern browsers):

    clipboard.writeText("This text is plain.");

    Read text from the clipboard (IE 9-11 and Chrome 65+):

    clipboard.readText().then(console.log, console.error);

    Caveats:

    Browsers may require a user gesture or user permission to access the clipboard. In particular, you should write text only in response to an event listener, e.g. a button click listener.

    Reading fails if the clipboard does not contain text/plain data.

    Other Data Types (e.g. HTML)

    Write (all modern browsers):

    var dt = new clipboard.DT();

    dt.setData("text/plain", "Fallback markup text.");

    dt.setData("text/html", "Markup text.");

    clipboard.write(dt);

    Read (IE 9-11, Chrome 65+):

    // The success callback receives a clipboard.DT object.

    clipboard.read().then(console.log, console.error);

    Caveats:

    Currently, text/plain and text/html are the only data types that can be written to the clipboard across most browsers.

    Unsupported data types will be silently dropped. In general, it is not possible to tell which data types will be dropped.

    This part of the clipboard API is still under active discussion, and may change.

    Currently, reading will only return the text/plain data type, if it is on the clipboard.

    Interface

    clipboard {

    static write: (data: clipboard.DT) => Promise

    static writeText: (s: string) => Promise

    static read: () => Promise

    static readText: () => Promise

    static suppressWarnings: () => void

    }

    clipboard.DT {

    constructor()

    setData: (type: string, value: string): void

    getData: (type: string): string | undefined

    }

    A note on clipboard.DT

    The asynchronous clipboard API works like this:

    var dt = new DataTransfer();

    dt.setData("text/plain", "plain text");

    navigator.clipboard.write(dt);

    Ideally, clipboard-polyfill would take a DataTransfer, so that the code above works verbatim when you replace navigator.clipboard with clipboard. However, the DataTransfer constructor cannot be called in most browsers. Thus, this library uses a light-weight alternative to DataTransfer, exposed as clipboard.DT:

    var dt = new clipboard.DT();

    dt.setData("text/plain", "plain text");

    clipboard.write(dt);

    This is way too complicated!

    Try this gist for a simpler solution.

    Chrome 42+

    Firefox 41+

    Opera 29+

    Internet Explorer 9+ (text only)

    Edge

    Desktop Safari 10+

    iOS Safari 10+ (text only in some versions)

    clipboard-polyfill uses a variety of heuristics to get around compatibility bugs. Please let us know if you are running into compatibility issues with any of the browsers listed above.

    Limitations

    In Microsoft Edge, it seems to be impossible to detect whether the copy action actually succeeded (Edge Bug #14110451, Edge Bug #14080262). clipboard-polyfill will always call resolve() in Edge.

    In Microsoft Edge, only the last data type you specify is copied to the clipboard (Edge Bug #14080506).DataTransfer and clipboard.DT keep track of the order in which you set items. If you care which data type Edge copies, call setData() with that data type last.

    On iOS Safari (WebKit Bug #177715) and Internet Explorer, only text copying works.On iOS Safari, clipboard-polyfill needs to use the DOM to copy, so the text will be copied as rich text. clipboard-polyfill attempts to use shadow DOM in order to avoid some of the page formatting (e.g. background color) from affecting the copied text. However, such formatting might be copied if shadow DOM is not available.

    In other browsers, writing copy data that does not include the text/plain data type will succeed, but also show a console warning:

    clipboard.write() was called without a text/plain data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning.

    clipboard-polyfill attemps to avoid changing the document selection or modifying the DOM. However, clipboard-polyfill will automatically fall back to using such techniques if needed:On iOS Safari, the user's current selection will be cleared. This should not happen on other platforms unless there are unanticipated bugs. (Please file an issue if you observe this!)

    On iOS Safari and under certain conditions on desktop Safari (WebKit Bug #177715), clipboard-polyfill needs to add a temporary element to the DOM. This will trigger a mutation observer if you have attached one to document.body. Please file an issue if you'd like to discuss how to detect temporary elements added by clipboard-polyfill.

    read() currently only works in Internet Explorer.Internet Explorer can only read text/plain values from the clipboard.

    Microsoft Edge (at least EdgeHTML version <17) does not write text/html to the clipboard using the Windows CF_HTML clipboard format (Edge Bug #14372529), which prevents other programs (including other browsers) from recognizing the copied HTML data (issue #73). clipboard-polyfill currently does not attempt to work around this issue.

    Node with --experimental-modules seems to require using import clipboard from "clipboard-polyfill" (instead of import * from) as of October 2018. Some environments may also require this.

    Repository

    展开全文
  • clipboard复制粘贴功能

    2019-11-02 15:44:27
    clipboard复制粘贴功能
  • Clipboard.js

    2018-10-09 14:27:57
    Clipboard.js是一款轻量级的实现复制文本到剪贴板功能的JavaScript插件。通过该插件可以将输入框,文本域,DIV元素中的文本等文本内容复制到剪贴板。
  • Clipboard Events specThis repository contains the specification for Clipboard Events.Tests for the spec are maintained inside the source code of the spec itself. They are extracted and built into a te...

    Clipboard Events spec

    This repository contains the specification for Clipboard Events.

    Tests for the spec are maintained inside the source code of the spec itself. They are extracted and built into a test suite by running TC-generator/tc-gen.py. When web-platform-tests/pull/1242 is done, the tests will live in the web-platform-tests repo.

    Contributions welcome - both tests and suggested edits.

    Because this specification is written using Bikeshed, all edits should be made to the index.bs file.

    The index.html file can then be generated by running the bikeshed command (with no arguements) in the repo directory.

    If you cannot run Bikeshed, you can still submit pull requests with edits to just the bikeshed.bs file and someone will follow up with a CL that generates the appropriate HTML.

    This specification formerly used W3C's CVS repository but that repo is no longer used for this specification.

    展开全文
  • Vue.js Clipboard Install npm install --save v-clipboard import Vue from 'vue' import Clipboard from 'v-clipboard' Vue.use(Clipboard) Using When an element that contains v-clipboard directive is ...
  • C# Clipboard

    2011-11-29 16:05:06
    Use C# to implement the function of clipboard about paste/cut/....
  • 基于vue-clipboard2的剪贴板.js的简单Vuejs2和Vuejs3绑定。 真棒! :sparkles: 感谢的启发! :red_heart: :red_heart: 关于 您可以像 vue-clipboard2 一样使用它,也可以将它与 Vue3 新的 Composition API 一起使用...
  • clipboard——复制

    2021-07-26 15:37:57
    常见方法: 1、clipboard.js 2、document.execCommand()已废弃 3、Navigator.clipboard (原生) 参考: JavaScript复制内容到剪贴板 MDN——Navigator.clipboard
  • Refactor Clipboard methods

    2021-01-11 14:09:29
    s related to the clipboard, I moved it completely to the Clipboard class, the equivalents of the previous methods now being <code>Clipboard::mimeType( Clipboard::Default )</code> and <code>Clipboard::...
  • clipboard.js Modern copy to clipboard. No Flash. Just 3kb gzipped. Why Copying text to the clipboard shouldn't be hard. It shouldn't require dozens of steps to configure or hundreds of KBs to ...
  • clipboard-page-源码

    2021-04-01 03:21:13
    clipboard-page
  • clipboard.js-master.rar

    2021-09-07 19:10:45
    clipboard+demo 复制粘贴插件——clipboard.js的使用
  • clipboard引入JS文件

    2018-03-13 23:54:57
    下载clipboard.min.js,直接引入到到需要使用的页面即可,具体使用方法请查看本人博客《使用clipboard.js实现复制文本内容到剪贴板》
  • <p>The typings for <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/2d78b6c3b18025e63a71cdf57be00230f6ff72aa/clipboard/index.d.ts">/clipboard.5.31</a> is something like <pre><code>...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 69,004
精华内容 27,601
关键字:

clipboard