Skip to content

Instantly share code, notes, and snippets.

@silvers
Last active June 27, 2022 07:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silvers/fad3f99ec8ef288cb116a7afc86ed4c2 to your computer and use it in GitHub Desktop.
Save silvers/fad3f99ec8ef288cb116a7afc86ed4c2 to your computer and use it in GitHub Desktop.
Enable Paste & Match Style in Confluence editor
// ==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