Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Participant

Keyboard Shortcuts in the Pretty HTML Editor

Jump to solution

Apologies if this has been asked elsewhere, but in trying out the new "Pretty HTML" feature, I have been unable to paste text using keyboard shortcuts.  So, my questions are as follows: 

  1. Is there a keyboard shortcut for pasting text into the pretty HTML editor? I can right click and select paste from the menu, but I'm specifically looking for a keyboard shortcut. 
  2. Is there documentation available for the keyboard shortcuts in the pretty html editor? In trying various combinations to find an option for pasting text, I did discover a few unexpected keyboard shortcuts actions. I'm curious as to what set of keyboard short cuts exist "under the hood" so to speak.  
35 Replies
Community Participant

@KOliveras I have not seen an issue with Copy/Paste on my end. It worked okay for me. However, if there are updated Keyboard Shortcuts, that would be good to see.

For @and-hu and @jnc, I just created a Feature Request regarding the Ctrl-F issue. It is waiting for review.

@James I had tried the suggestion you mentioned about turning off extensions in Chrome. That does not fix the Ctrl-F issue for me. That also seems an odd fix considering Ctrl-F works fine in the Raw Editor despite using extensions. If it works in the Raw Editor, but not the Pretty Editor, that would imply something different about the Pretty Editor is causing the issue. Users should not have to make changes in their browser every time they switch from Raw to Pretty. Also, switching to Incognito mode did not correct the issue with Ctrl-F. If that helps you to know what I am seeing on my end.

Community Participant

For the people with issues, are you using touchscreen computers/laptops?

@KOliveras I took a further look at the CodeMirror.js file and from the way is written, we should only get the emacs bindings (which are one of the 2 fallthroughs in keyMap.macDefault) in the case where mac is true in this statement.


keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;


mac is defined as:


 var mac = ios || /Mac/.test(platform);


So, it's true iOS if true or platform has Mac in (platform is a variable that is equal to navigator.platform, which you can run in your web console. Mine evaluated to false).

Next, iOS is defined as: 


var ios = !edge && /AppleWebKit/.test(userAgent) && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);


Which is true is your userAgent doesn't have "Edge" in it (that's what edge checks for, and Chrome doesn't), if your userAgent has AppleWebKit in it (which Chrome does, but Firefox does not), and if your useragent has mobile in it (Chrome doesn't) OR it has a navigator.maxTouchPoints > 2.

In my laptop that isn't working, a touchscreen Windows 10 laptop, navigator.maxTouchPoints is 10. In the work-issued laptop, which is working properly, this is 1.

So, there are probably other issues, but it looks like one of them is that the code identifies us as iOS, and then Mac users, so defaults to the macDefault. The macDefault fallthrough probably tests some other aspects of Macs that we fail, so we get stuck with the eMacs ones. Ultimately then, this looks like a bug Canvas has to fix.

View solution in original post

Community Participant

Wow!  Thanks @and-hu   This is incredibly helpful information!  I was a bit too tired last night to look into this and was planning on looking at it this morning.  What a great way to wake up and see that someone else had done it (and documented it far better than I could) :D. MANY THANKS!

And yes, all of my PC’s have multiple touch points.

@and-hu - That's it! Copy/Paste works just fine on my work laptop, but not my personal (Acer Spin) which has a touch-screen. Thanks for sharing back!

Community Team
Community Team

@and-hu @jnc and anyone else who has noted the search results discrepancy between Pretty and Raw HTML views, would you please initiate support cases for this and include the link to this conversation in the ticket description? Our support team is compiling these for further review.


Community Contributor

Folks, thanks for your posts. I was, first, quite excited just to see this implementation. Pretty is nice.

I can confirm full functionality of CTRL-C, -V, -Z, -F using Firefox on a Windows 10 machine.

Community Member

I also have the same keyboard shortcuts issues reported by @and-hu and @jnc , specially with CTRL + F. This is very frustrating because in our institution we use this shortcut a lot as we create the pages. Anyway, as @JeffCampbell said, Ctrl + F works fine in the Raw Editor. So, it's sad, but we are using Raw Editor despite the Pretty Editor looks, actually, prettier. I hope Instructure can fix this issue in the next release.

Community Participant

@Stef_retired  Is the team currently working on this?  It seems like there have been a few changes over the last 24 hours and I'm getting very different behavior than when I originally posted the thread.  I’m currently trying to reply to discussion posts on my Canvas site using the pretty html editor, and now simply typing “d” (without CTRL, ALT, or any META keys) attempts to delete the post. 

I will follow up re support (Win 10, Chrome, Multi-Touch).

@KOliveras I recommend that you initiate a support case for this; I'm not able to replicate the behavior you've described.

Community Participant

Hi @Stef_retired Stefanie

I initiated a support request several days ago and received a response this morning that was unhelpful to say the least. The suggestion that it must be browser when the functions work fine on raw editor and on all other activities within that browser really doesn't help (and makes no sense to me) - nor does the suggestion to search one segment of the pretty html editor at a time.  I've responded to try to escalate, but even though I included a link to this thread it seems the support responder did not look at it.

Hello Julie

Thank you for your patience regarding the issue you see within the Pretty HTML editor.

Looking into this issue, I was able to see where you're seeing the issue when searching in the Pretty HTML editor. However, the keyboard shortcut cmd+f or ctrl+f is a function of the browser, not of Canvas. Depending on how each browser is configured it may read the information differently. I was able to see if you scroll through the HTML and then use the search function, more results do appear.

If you have more questions or need anything else, please let us know.