Control copy and paste with unformatted output - google-chrome

I wish I could Copy and Paste in my Chrome browser without outputting text with html format. I'd like a pure TXT.
Is there a soul in this world who knows the shortcut (something like control+shift+alt+tap+capslock + v) or some plugin?
The reason I want it, its because i don't want to control+paste in notepad and recopy again.
Would be awesome a generic solution for this, AKA not only to firefox.
Cheers!

Use Ctrl + Shift + V, as described here.

Related

How to format HTML code in VS Code on Ubuntu?

I have installed the prettier extension on VS Code and use this shortcut - Ctrl+shift+ I. But it doesn't work for me.
Also tried this- Setting the VSCode preference html.format.wrapAttributes to force. But nothing happens.
If "Format Document" is what you are referring to, you just have to press F1 and search for Format Document or just press Shift + Alt + F

How to structure the code in PhpStorm

How is it possible to structure the code in PhpStorm without tap every tab for each line?
I mean, witch key I need to press to structure the code?
I tried a lot of key combinations, but without success. Unfortunately, I do not find the right page in the doc
To reformat code on mac the default is Ctrl + alt + L, but you can find it under Menu Code -> Reformat Code.
You can also assign your own keys if you want, by going on PHPStorm->Preferences->Keymap and in the search bar you can tap Reformat Code (again this is on mac, on windows I think this is under File->Preferences)

Is there a way to allow users to copy text from a website, and the text be unformatted?

Pretty much just the question. I have a client that is requesting a negative design with nearly white text all over the webpage, but testers are saying that it's annoying to copy and paste from the website as everything shows up as white text when copying into Word or the like.
Is there a way to either preemptively remove formatting when a user tries to copy text from the website? Or is there a way to hijack what actually gets put on the clipboard?
Ctrl + alt + v or ctrl +shift + v should paste what's on your clipboard as unformatted text. Very handy for copying code samples to word docs. This should also work on Mac if you substitute cmd for Ctrl
Using code from both here Javascript: Hijack Copy? and here Get the Highlighted/Selected text (thanks #Jacque Goupil) I was able to piece together the following code that strips the formatting from anything copied on the page:
$("body").bind('copy', function(e) {
var newEl = document.createElement("p");
document.body.appendChild(newEl);
if (window.getSelection) {
newEl.innerHTML = window.getSelection().toString();
} else if (document.selection && document.selection.type != "Control") {
newEl.innerHTML = document.selection.createRange().text;
}
var selection = document.getSelection();
var range = selection.getRangeAt(0);
selection.selectAllChildren(newEl);
setTimeout(function() {
newEl.parentNode.removeChild(newEl);
selection.removeAllRanges();
selection.addRange(range);
}, 0)
});
What goes in the clipboard by default depends on the browser. Text processors like Microsoft Word usually have options to ignore pasted style, so it shouldn't be an issue if they learn how to use it properly.
If you still want to make life easier for people, you could detect copy events and replace the formated text with raw text. This might help you:
How do I copy to the clipboard in JavaScript?
Get the Highlighted/Selected text
In Word you've got the option to 'Paste as plain text' (or 'Paste without formatting', not sure of the exact name in English). That way, you can easily paste text from any website without markup.
I don't think it should be the responsibility of the website to implement a 'copy without markup'.
Other trick: paste text with markup in Notepad first. Then select it in Notepad and copy again. The clipboard now contains only plain text.
Of course it's hard to educate the users, but unless there is a very good reason why people would be copying texts from the website, I wouldn't make a custom implementation for it. Those implementations, especially when you override default behaviour (capture Ctrl+C), will probably not work well or at least the same in every browser, and they are just a fix for your website, not everyone else's. Also, such a feature might annoy other users who do know how to handle text with mark-up. So I think it's better to let the users figure out themselves.
As for hijacking the clipboard, if you copy HTML, the browser actually copies the content in multiple formats, like HTML, RTF and plain text. If you had the means, you could simply remove the HTML and RTF version from the clipboard and let the plain text version remain. But I'm pretty sure you don't have that much control over the clipboard from the browser.

Format Code In MonoDevelop

I am using MonoDevelop on Mac to write MonoTouch apps. Automatica code indenting/formatting works great while I am typing.
The problem is that when I copy and paste code snippets, in many cases I lose the formatting and lines are combined together, indenting is lost, and it is a huge pain to implement the tabs, spacing, and line breaks manually. Is there anyway I can use a command in monoDevelop to automatically indent and apply the formatting to existing code.
I thought maybe Edit|Format|Format Document/Selection would work, but these commands don't have any affect on the code at all.
Any help?
To format the entire document in one keystroke: control-I
To format a selection: Edit->Format->Format Selection
To customize the formatting: MonoDevelop->Preferences->Source Code->Code Formatting
You actually need to select all your text, and then go to Edit->Format->Format Document. It doesn't seem to work otherwise.
For me on macOS, the shortcut for "auto-format" is CTRL + i.
You can change the shortcut if you want. To change it, go to Preferences -> Key Bindings, then type "format" in the search box and edit the "Format Document" shortcut/key binding.

how can i get the same effect comes by "ctrl + k" in stackoverflow question, in my html code?

see by writting some code here we select that code & press ctrl + K and that code now prints in something different format.
printf("this is code");
see now i copy uper sentences code & paste it below in ctrl+ k mode
printf("this is code");
okey so now i want to know how can i get same effect in my wordpress-blog's post?
any plugin or any technique or any html tag ?
It looks like you are looking for a WP plugin which can handle source code syntax highlighting. Here are some examples which may work for you:
http://wordpress.org/extend/plugins/wp-syntax/screenshots/
http://wordpress.org/extend/plugins/google-syntax-highlighter/screenshots/
You'll want a code highlighter. For WordPress, Geshi-backed highlighters are pretty common. http://wordpress.org/extend/plugins/tags/geshi
You'll be looking for the <pre> tag.