Tags:
create new tag
view all tags

SID-02501: Instant copy all code from code block

Status: Answered Answered TWiki version: 6.1.0 Perl version:
Category: SyntaxHighlightingPlugin Server OS: Last update: 2 years ago

I use the Syntax Highlighting Plugin when displaying code and I like to display the code with the row numbers. But when I want to copy the code from the block the row numbers are copied as well. Is there a button or a way to copy the code with one click without the need to select all the code beforehand and to have the numbers on the left selected as well?

-- TWiki Guest - 2023-01-23

Discussion and Answer

That would be a useful enhancement to be able to copy just the source code, e.g. without line numbers. I envision a [Copy] button at the upper right of the code section, enabled with a new copy="on" parameter.

TWiki is open source; please consider supporting open source software. You could enhance the plugin to provide that functionality (using jQuery and JavaScript), and contribute that back to the community, or you could hire one of the TWikiConsultants to do that for you (including myself).

-- Peter Thoeny - 2023-01-24

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Instant copy all code from code block
SupportCategory SyntaxHighlightingPlugin
TWiki version 6.1.0
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2023-01-24 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.