-
-
Save silvers/fad3f99ec8ef288cb116a7afc86ed4c2 to your computer and use it in GitHub Desktop.
Enable Paste & Match Style in Confluence editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Happy paste in Confluence | |
// @namespace https://gist.github.com/silvers/ | |
// @version 0.2 | |
// @description Enable Paste Without Formatting in Confluence editor | |
// @author silvers | |
// @include */editpage.action?* | |
// @include */createpage.action?* | |
// @run-at document-idle | |
// @grant none | |
// ==/UserScript== | |
(() => { | |
let editor = document.querySelector("#wysiwygTextarea_ifr").contentDocument.querySelector("#tinymce"); | |
editor.addEventListener("focus", () => { | |
if (tinyMCE && tinyMCE.activeEditor) { | |
tinyMCE.activeEditor.shortcuts.remove('meta+shift+v', '', ''); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment