1

If we consider the task pane of an Office add-in as a small browser, I am wondering if there is a native way to zoom in/out it like what we can do in a normal browser by cmd + +/cmd + - .

For example, in Excel for Mac, when we modify the scale of an Excel worksheet, the content of the task pane does not scale with it systematically. So I am wondering how to zoom in/out this small browser.

I am looking for either a manual way (eg, by some shortcuts) or some JavaScript API such that we could implement zoom in/out buttons inside the task pane.

SoftTimur
  • 5,630
  • 38
  • 140
  • 292

1 Answers1

1

On windows it works with Ctrl + +/Ctrl + -, you can zoom in using these shortcut keys.

Deepak Sharma
  • 1,873
  • 10
  • 23
  • Those shortcuts do work in Excel for Windows. Do you know what are the solutions for Excel for Mac and Excel Online, and any JavaScript API? – SoftTimur Sep 18 '17 at 09:20
  • Basically your code is running on trimmed version of safari, so the commands to zoom in and zoom out of safari should work. If it is not working then you could try the css approach, something like this should work. .zoom { zoom: 2; } – Deepak Sharma Sep 18 '17 at 09:52
  • At the same time I don't recommend you to implement the zoom in and zoom out functionality yourself let the platform handle that if possible – Deepak Sharma Sep 18 '17 at 09:53
  • Shortcuts do work in Excel for Mac too. Now, the shortcuts don't work only in Excel Online, because when we press `cmd + +` or `cmd + -`, the whole browser window zoom in/out including the task pane. Do you have a solution? – SoftTimur Sep 18 '17 at 09:59
  • I cannot make `zoom` work with iframe, whereas `transform: scale(xxx)` does have some effects. However, it does not look exactly the same as zooming in/out. I still want some native way (shortcuts / JavaScript API) to zoom in/out. – SoftTimur Sep 18 '17 at 10:21