I am new to programming and I have basic HTML skills. I am creating a basic web site and I have information in a paragraph and the information is separated by &lt;br&gt; tags. I am looking to add a "copy to clipboard" button and function so that the 16 lines of information are saved to the clipboard.   &lt;p&gt; this is the 1st line&lt;br&gt; this is the 2nd line&lt;br&gt; ... this is the 16th line [copy to clipboard] &lt;p&gt;
6603
What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData(&quot;Text&quot;, text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege(&quot;UniversalXPConnect&quot;);         const clipboardHelper = Components.classes[&quot;@mozilla.org/widget/clipboardhelper;1&quot;].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :
108167
In Internet Explorer I can use the clipboardData object to access the clipboard. How can I do that in FireFox, Safari and/or Chrome?
93794
I regularly copy and paste text between spreadsheets, emails, browser windows, etc. I can't think of a single time when I've wanted to keep the formatting from the source text.  I already know about the following workarounds:   Use “Edit” → “Paste Special” → “Unformatted text” Paste to Notepad and copy from there Install a program that takes over the clipboard   What I want is to tell Windows to just do this by default.  Is this possible?
46175
What solutions accomplish the same auto-completion that SO uses for entering tags?  There are plugins that can handle one word but I haven't seen any that handle multiple words.
29605
Within OS X 10.11.6, the  Cmd ⌘   Shift ⇧   4  key combination saves a screenshot to the desktop by default.  Is there a way to automatically copy the file to the clipboard (in addition to saving the file), so that the screenshot can be pasted into a document?  Maybe there is some clever why to tee and pipe the image to the clipboard?  The intent is to:    save screenshot to a file and  copy screenshot to the clipboard    with a single command.   Examples are always appreciated.
70927
I'm trying to copy-paste some text from vim. I'm doing v to enter visual mode, then y once I selected my block.  It appears to copy the text into vim's clipboard, because p will paste it. But in another program (e.g. Chrome), right-click->paste doesn't paste the correct text. How do I copy text to the correct clipboard?
33011
Let’s say I have many lists of this kind on a page:   Click on the Foo button. Tick the Bar box. Click on the Save button.   How should I emphasize Foo, Bar, and Save?   Bold?   Click on the Foo button. Tick the Bar box. Click on the Save button.  Italic?   Click on the Foo button. Tick the Bar box. Click on the Save button.  Quotes?   Click on the “Foo” button. Tick the “Bar” box. Click on the “Save” button.    NOTE: I want the lists to be read as easy as possible.
97795
Every now and then, I edit another user's question or answer and encounter something along the lines of the following in the post source: Help, I need this question solved with these things:&lt;br /&gt; &lt;ul&gt;&lt;li&gt;Item1&lt;/li&gt;&lt;li&gt;Item2&lt;/li&gt;&lt;li&gt;Item3&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;  Can you guys help me with this? Oh and check here also &lt;a href=&quot;vagueurl.com&quot;&gt;Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  Thanks!  Of course, it works, and it renders properly on the question's page... But... it's a real pain to edit and keep the HTML formatting clean and valid. Furthermore users that are not known with HTML and want to edit a post, might have difficulty to do so. For most SU/SO/SF users it probably won't be too big a problem but I can imagine users from ,  or any other SE site being like &quot;What the hell is this?&quot; If you just stick witk  and at least use its full potential, you'll be using a standard that every user should be able to understand. It will also make the post structure a lot more clear. For example: Help, I need this question solved with these things:   - Item1  - Item2  - Item3  Can you guys help me with this? Oh and check here also [Here][4].  Thanks!    [1]: http://vagueurl.com  Honestly, I don't know why . I understand that not every tag that is allowed has a MarkDown replacement, but tags like the &lt;ul&gt;, &lt;li&gt;, &lt;h1/2/3&gt; and the &lt;br /&gt; should at least be discouraged. We could for example display a warning similar to the &quot;This question seems subjective and will most likely be closed as off-topic&quot; that is shown when certain tags are used. For example something like the following warning could be shown when the &lt;br /&gt; tag is detected:  You seem to be using the &quot;&lt;br /&gt;&quot; HTML tag to create a new line. Stack overflow uses  to format posts, please use a blank line to create a new paragraph or a double space &quot;  &quot; to create a new line. For more help, please visit our .  So, for the TL;DR people: Why HTML in posts should be discouraged in my opinion:  Standardized formatting will make post editing easier and more clear in structure. Standardized formatting prevents weird and invalid HTML. The MarkDown editor used by SE does not &quot;support&quot;/use HTML formatting to insert images/links. I'm not saying HTML usage should be banned, but rather that HTML is discouraged as much as possible.  What do you guys think?
56869
I have a txt file which actually is a html source of some webpage. Inside that txt file there are various strings preceded by a "title=" tag.  e.g.   &lt;div id='UWTDivDomains_5_6_2_2'  title='Connectivity Framework'&gt;    I am interested in getting the text Connectivity Framework to be extraced and written to a separate file.  Like this, there are many such tags each having a different text after the title='some text here which i need to extract '  I want to extract all such instances of the text from the html source/txt file and write to a separate txt file. The text can contain lower case, upper case letters and number only. The length of each text string(in characters) will vary.  I am using PowerGrep for windows. Powergrep allows me to search a text file with regular expression inout. I tried using the search as        title='[a-zA-Z0-9]  It shows the correct matches, but it matches only first character of the string and writes only the first character of the text string matched to the second txt file, not all string.   I want all string to be matched and written to the second file.  What is the correct regular expression or way to do what i want to do, using powergrep?  -AD.
27970
Let's say I write up a bunch of rows and decide I want to make it a list:  Item 1 Another Item Something Else   When I mark each line and click the "List" button (doesn't matter which one), the Editor takes all three rows and makes one list item out of them, ignoring the line-breaks.  The output will simply be:  - Item 1 Another Item Something Else   It would be far more useful and less buggy if it would instead create one list item for each line:  - Item 1 - Another Item - Something Else
87922
I used the Bing webmaster tool's SEO analyzer on my website, and it reported:     There are multiple  tags on the page.   It recommends that there should only be one &lt;h1&gt; tag on the page.  The page is a listing of blog posts for a category. So each blog entry is structured like this.  &lt;article&gt;     &lt;header&gt;&lt;h1&gt;&lt;a&gt;...&lt;/a&gt;&lt;/h1&gt;&lt;/header&gt;     &lt;p&gt;summary...&lt;/p&gt; &lt;/article&gt; &lt;article&gt;     &lt;header&gt;&lt;h1&gt;&lt;a&gt;...&lt;/a&gt;&lt;/h1&gt;&lt;/header&gt;     &lt;p&gt;summary...&lt;/p&gt; &lt;/article&gt; &lt;article&gt;     &lt;header&gt;&lt;h1&gt;&lt;a&gt;...&lt;/a&gt;&lt;/h1&gt;&lt;/header&gt;     &lt;p&gt;summary...&lt;/p&gt; &lt;/article&gt; &lt;article&gt;     &lt;header&gt;&lt;h1&gt;&lt;a&gt;...&lt;/a&gt;&lt;/h1&gt;&lt;/header&gt;     &lt;p&gt;summary...&lt;/p&gt; &lt;/article&gt;   How is this invalid? I thought this was the correct way to describe a post in HTML5.
55981
I need to get thousands of snippets of text from PDFs to a spreadsheet. They are short, seldom more than 2-3 rows, but each line break creates a new cell, and I have to repair that manually, which costs lots of time.   Because I have so many of them, using the "paste into Word and do a find-and-replace" workaround is just too time-wasting for me. Is there a way to have the line break disappear on copy? Maybe there is a viewer which offers a special copy mode for this, or has a plugin?   The documents are scientific articles. The text arrangement is quite linear. You can assume that the text I'm copying is not inside a table or a float, and not rotated or anything. (If such a thing happens, I think I'll deal with it manually). The text is frequently set in two columns, but I have no trouble marking just the text I need from its column. I don't need to preserve any special formatting. I'm willing to try a solution which removes all unprintable characters, for example. The texts are in English, it is OK if the solution only works in ASCII/strips all non-alphanumeric ASCII of the copied text.   I have a very strong preference for a solution which will work on Linux, possibly some kind of Okular plugin. But if there happens to be a Windows-only solution, I want to hear about it too. I have a license for a somewhat recent Acrobat Pro on the Windows machine.
40922
Is there a way to copy the currently selected filename, including the path, to the clipboard? Ideally this would be through the right-click menu.  Some degree of flexibility would be useful, like the ability to copy just the filename, path+filename, filename minus extension, etc. This isn't essential, though, as long as it can copy the path+filename.  The solution must be compatible with Windows XP, Windows Vista and Windows 7.
24624
I have snippets of Html stored in a table. Not entire pages, no  tags or the like, just basic formatting.  I would like to be able to display that Html as text only, no formatting, on a given page (actually just the first 30 - 50 characters but that's the easy bit).  How do I place the "text" within that Html into a string as straight text?  So this piece of code.  &lt;b&gt;Hello World.&lt;/b&gt;&lt;br/&gt;&lt;p&gt;&lt;i&gt;Is there anyone out there?&lt;/i&gt;&lt;p&gt;   Becomes:  Hello World. Is there anyone out there?
3694
I want to prefill multiple paragraphs when user click on "add node" for specific content type. What would be a good way to do this ?
120376
As more and more websites add  of one type or another to e-mail and password fields and more people use password managers, the two are increasingly coming into conflict.  While there are extensions such as  for Chrome or  and the dom.event.clipboardevents.enabled preference&dagger; for FireFox, all of these suffer the problem that there are legitimate reasons why websites might want to hook into onpaste (such as Google docs rich text support or Facebook's link handling) so I don't want that functionality completely disabled.  &dagger; Go to about:config and search for dom.event.clipboardevents.enabled then double click to toggle.  Another option is to hack every page you find with the offending code manually, but that is a lot of hassle and doesn't work in every case (such as with ). One suggestion of how to do this can be found on Martin Brinkmann's  page.  Ideally I just want to be able to say "Re-enable paste on all fields on this page" either as a button or a context menu option for the page, so is there any way to do this?  The closest thing I have found is Derek Prior's  but this uses the same method as the manual method, so fails to work with the specific page I was having problems with, and I have no idea how many other methods might be available.
62985
I have the following data:  http://example1.com    anchor text 1     http://example2.com    anchor text 2 http://example3.com    anchor text 3       And I would like the output to be:  http://example1.com    anchor text 1    &lt;a href="http://example1.com"&gt;anchor text 1&lt;/a&gt; http://example2.com    anchor text 2    &lt;a href="http://example1.com"&gt;anchor text 2&lt;/a&gt; http://example3.com    anchor text 3    &lt;a href="http://example1.com"&gt;anchor text 3&lt;/a&gt;   I have tried getting the code to substitute cells A1 and B1 in cell C1 like this:  ="&lt;a href="A1"&gt;B1&lt;/a&gt;"   However, I'm getting errors because of the equal sign and double quotes in the HTML code. I have tried using single quotes to escape it, but still no luck.  Anyone know how to do this? Your help is highly appreciated.