General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › "Copy Code" function
-
Jren June 20, 2011 at 9:11 pm
"Copy Code" function
June 20, 2011 at 9:11 pmParticipants 0Replies 1Last Activity 11 years, 7 months agoHullo folks,
The .chm files we are required to provide a “Copy Code” function that allows the reader to move code snippets examples to their clipboard for their own use.
Getting the snippets to appear is pretty straight forward, but does anyone have a method to move a code example to the clipboard with one click?
Derek Read June 21, 2011 at 4:18 pm
Reply to: "Copy Code" function
June 21, 2011 at 4:18 pmSearch for “ie copy clipboard” and you will find lots of different solutions. Two examples for inspiration:
http://www.htmlgoodies.com/beyond/clipboard.html
http://www.dynamicdrive.com/dynamicindex11/copytext.htmI believe people have had problem with running scripts inside CHM files since Microsoft changed the security model for Internet Explorer (which is used to render the HTML inside HH.exe). That started with the release of XP SP2, so you might need to watch out for that. You might want to check MSDN or Microsoft.com to see if there is any specific information about this.
Or perhaps you could use this to build your CHM as it mentions that it includes a built-in copy to clipboard function:
http://shfb.codeplex.com/ -
AuthorPosts
- You must be logged in to reply to this topic.