Is there a shortcut for Paste as Plain Text in Chrome and Confluence?
Asked by Gabriel Porras:

Chrome in Windows has **Paste** : *Control + V* and **Paste as Plain Text** : *Control + Shift + V*.

It worked everywhere but **Confluence**.

Why? Is there another shortcut to it?

Thanks


Answers:
author: James Dellow
body: Yes, the rich text editor in Confluence doesn't appear to support the Control + Shift + V command.

If you are just copying and pasting other web content in Chrome to Confluence, you could try installing an add-on from the Chrome Web Store to help strip the formatting?

BTW have you considered raising this issue as a feature/bug request? <https://jira.atlassian.com>


author: Adam Tjaden
body: In Firefox, I was able to create a bookmark with the following as the "URL":

```
javascript&colon;function removeShortcut() { tinyMCE.editors[0].shortcuts.remove("ctrl+shift+v"); return; } removeShortcut();
```

The important part is to return so that the page isn't redirected to display the return value of the remove() call (true).


author: Noam Yorav-Raphael
body: It's really stupid, but obviously Atlassian aren't interested in fixing this. This hack worked for me: I added this to my autohotkey2 script:

```
; Make paste without formatting work in confluence.
#HotIf WinActive("Confluence")
^+v::
{
    A_Clipboard := A_Clipboard
    Send "^v"
}
#HotIf
```

It means that whenever the window title includes the word "Confluence", AutoHotKey will set the keyboard to its text representation, discarding any formatting, and press Ctrl-V.


author: Dmitry
body: Hello,

It's a pretty hackish solution, but you can do it using CUSTOM HTML and play around with javascript.

```
<script type="text/javascript">// <![CDATA[

var fixShortCut = function(){
  if (typeof tinyMCE !== "undefined" && tinyMCE.editors.length > 0)
  {
    tinyMCE.editors[0].shortcuts.remove('ctrl+shift+v');
  }
  else
  {
    setTimeout(function (args) {fixShortCut();}, 5000);
  }
}

window.onload = function(e){ 
  fixShortCut();
}
// ]]></script>
```


author: Shaun
body: Unfortunately Confluence overrides Cmd-Shift-V / Ctrl-Shift-V as a shortcut for 'Paste Row Before' within tables.

I've created a bookmarklet you can use to override this behavior:

```
javascript&colon;delete tinyMCE.editors[0].shortcuts["ctrl,,shift,86"]
```

To use it open the Bookmark Manager in Chrome and choose 'Add New Bookmark'. In the URL section copy and paste the above. It should look like this:

![fix-paste.png](https://community.atlassian.com/t5/image/serverpage/image-id/86598i40625833A75CE292/image-dimensions/503x279?v=v2 "fix-paste.png")

Next time you're in the Confluence editor **click the bookmark first** (it won't be obvious anything has happened), then use Cmd+Shift+V and it should work as normal.

comments: author: Adam Tjaden
body: In Firefox, this goes to a new page with just "true" on it. Do you know a way to make this bookmarklet execute on the current page in Firefox?


author: Sebastian Vogel
body: unfortunately this bookmarklet does not work with tinyMCE 4+, the new way to disable the shortcut is via the tinyMCE API <https://www.tiny.cloud/docs-4x/api/tinymce/tinymce.shortcuts/>

```
javascript&colon;require("tinymce").editors[0].shortcuts.remove('ctrl+shift+v')
```

![2020-09-17 09_46_58-Lesezeichen.png](https://community.atlassian.com/t5/image/serverpage/image-id/110678iA56C7EDE11EAF442/image-size/large?v=v2&px=999 "2020-09-17 09_46_58-Lesezeichen.png")


author: Kevin Finn
body: Thanks - I tried this out, unfortunately I could not get it to work.

From the Chrome console, I get:

Uncaught TypeError: require(...).editors\[0\].shortcuts.remove is not a function  
at \<anonymous\>:1:41

With some minor modifications to debug, it seems to me that the require is actually not succeeding in my environment, even though the error is about .remove() . I'm new to JS though.

Any other thoughts on how to debug this and get it to work?


author: Kevin Finn
body: Update: A coworker who is way smarter than me provided the following bookmarklet, which works at the moment but could break in the future.

```
javascript&colon;tinyMCE.editors[0].addShortcut('ctrl+shift+v','',(editor) => {editor.execCommand('mceInsertContent', false, window.clipboardData.getData('Text'));})
```


author: Adam Tjaden
body: This doesn't work for me:

```
Uncaught TypeError: editor is undefined
```


author: Kateryna Shneidmillier
body: This appears to be supported now.

On mac/windows: Command/Control -\> Shift -\> V to paste plain text without formatting.

comments: author: Kateryna Shneidmillier
body: For me on Chrome still does not work even though I can plain-paste via context menu


author: Gabriel Porras
body: Thanks @James Dellow.. I'll try with Chrome extension

; )

comments: author: Kateryna Shneidmillier
body: Which extension is meant here?


Tags: cloud

confluence-cloud