For V3 setting the page mode to IE8 enables the Edit in Office button. The page mode can be set in header.vm. A parm passed in the URL can be used to determine which mode to display the page in. This also fixes the RTE in IE11.
Code to add to the top of /confluence/confluence/decorators/includes/header.vm
#if ( $req.getHeader("User-Agent").matches('.*Trident.6.*') ) ## If IE10 then set IE=8 mode - no other changes required
<meta http-equiv="X-UA-Compatible" content="IE=8" />
#else ## If IE11
#if ( $req.getQueryString().matches(".*(?i)mode=IE8.*") ) ## If IE11 and override = RTE then set IE user agent to IE=8
<meta http-equiv="X-UA-Compatible" content="IE=8" />
#end
#if ( $req.getQueryString().matches(".*(?i)mode=IE11.*") ) ## If IE11 and override = WME then set IE user agent to IE=Edge
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
#end
#if ( $req.getQueryString().matches(".*(?i)mode=Edge.*") ) ## If IE11 and override = WME then set IE user agent to IE=Edge
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
#end
#if ( ($req.getRequestURI().matches(".*editpage.action.*" )) ||
($req.getRequestURI().matches(".*createpage.action.*")) ||
($req.getRequestURI().matches(".*plugins.tinymce.*")) ||
($req.getRequestURI().matches(".*createblogpost.action.*")) ||
($req.getRequestURI().matches(".*editblogpost.action.*")) ||
($req.getRequestURI().matches(".*doaddcomment.action.*")) ||
($req.getQueryString().matches(".*(?i)showComments=true&showCommentArea=true.*")) ||
($req.getQueryString().matches(".*editComment=true.*")) ||
($req.getQueryString().matches(".*replyToComment=.*"))
) ## When editing or creating pages, blog posts or comments
<meta http-equiv="X-UA-Compatible" content="IE=8" /> ## Default IE11 editing mode is currently IE=8
#end
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> ## For all IE11 pages, and by default if no mode already set use Edge mode
#end
After added this code to header.vm any of the coded page actions - editpage, createpage, etc - is IE=8. For any other page it is rendered in IE11 (edge) mode.
In IE=8 mode the Browse and User drop down menus will not work.
A button can be added to every wiki page to allow switching between IE=8 and IE=11 mode. This can be helpful to allow users to use the Edit in Office button in V3.
<style>
.buttona {
font: bold 11px Arial;
text-decoration: none;
background-color: #EEEEEE;
color: #333333;
padding: 2px 6px 2px 6px;
border-top: 1px solid #CCCCCC;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
border-left: 1px solid #CCCCCC;
}
.buttonb {
padding: 0.1em 0.6em;
border: 1px solid #ccc;
font-size: 11px;
font-family: Arial,Helvetica,sans-serif;
background-color: #f7f7f7;
color: #333;
-moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
display: inline-block;
margin: 0 0.1em;
text-shadow: 0 1px 0 #fff;
line-height: 1.4;
white-space: nowrap; }
</style>
<script>
var docMode = document.documentMode; var URL = window.location.href.toString(); var docURL = URL.replace(/(\?|\&)+mode=IE(8|11)/ig, '');
document.write("<!-- span>This is the document mode: " + docMode + "<\span -->");
var delim = "?"; var URLAnchor = ""; if ( docURL.match(/\?/g) ) { delim = "&"; }
var theAnchor = ""; if ( URL.match(/\#/g) ) { splitURL = docURL.split("#",2); docURL = splitURL[0]; theAnchor = "#" + splitURL[1]; }
var newMode = 0;
if ( docMode == 11 ) { newMode = "IE8"; }
else { newMode = "IE11"; }
var goHere = docURL + delim + "mode=" + newMode + theAnchor; document.write( "<span><a id=\"modetoggle\" class=\"buttonb\" href = \"" + goHere + "\">Toggle mode to " + newMode + "</a></span>");
</script>
Then teach users to click the 'Toggle mode to IE8' button before clicking the 'Edit Document' button.
For V3 setting the page mode to IE8 enables the Edit in Office button. The page mode can be set in header.vm. A parm passed in the URL can be used to determine which mode to display the page in. This also fixes the RTE in IE11.
Code to add to the top of /confluence/confluence/decorators/includes/header.vm
After added this code to header.vm any of the coded page actions - editpage, createpage, etc - is IE=8. For any other page it is rendered in IE11 (edge) mode.
In IE=8 mode the Browse and User drop down menus will not work.
A button can be added to every wiki page to allow switching between IE=8 and IE=11 mode. This can be helpful to allow users to use the Edit in Office button in V3.
Then teach users to click the 'Toggle mode to IE8' button before clicking the 'Edit Document' button.