"Highlight color" Function in Google Docs

55 views
Skip to first unread message

Jacob Wiechman

unread,
Dec 15, 2022, 1:14:22 PM12/15/22
to Google Apps Script Community
I was wondering if any of you knew if this would even be possible. 

I know that this functionally does not exist by default
, but I was wondering if anyone had figured out a way to assign a hotkey (using an extension or any other solution) to activate the "Highlight color" function in Google Docs. I have already put this in as a suggestion, but I feel like there has got to be some interim solution that I am not thinking of! I know you can copy and paste formatting, but you have to set that up in each new document. I'd like to be able to open any document and immediately use a hotkey to highlight text in a specific color.

I was directed here by a product expert. Thanks so much in advance!

cwl...@gmail.com

unread,
Dec 16, 2022, 10:35:07 AM12/16/22
to Google Apps Script Community
Can you add a bit more context? Is this something you can do manually? I'm not familiar with this functionality.  That being said, you could probably build a Docs addon/extension that would either add a menu item, or a sidebar that would let you interact with the document. 
You would have to write the script in such a way that it gets the document body, parses the objects within the body, checks the properties of each object and checks for a specific format. Each time it finds a match, it would format it as you program it. 

I don't know about adding a hot-key, that is why I mentioned adding a menu item or sidebar for script execution.
Reply all
Reply to author
Forward
0 new messages