I am trying to create a simple google chrome extension which can convert selected text to italics on right clicking on the menu and selecting to italics from it.
Can anybody point me in the right direction on how to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I guess you probably want to add “turn into italics” into the context menu that appears when the user right clicks?
In that case, you want to add an item to the context menu through this API. Then, at the callback function, you get the tab id. From there, you can follow this answer to get the rest of the way through. Drop a line if you encounter any problems.