Tags:
create new tag
view all tags

SID-02500: How to embed code via Syntax Highlighting Plugin in table?

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

Instead of verbatim, I would like to use the Syntax Highlighting Plugin when displaying code. Unfortunately I can't just "swap" the <verbatim>...code</verbatim> for the %CODE{"sql"}%...code...%ENDCODE% in the table cell because the row would containing the code would not be formatted correctly. Is there a way to get around this problem?

-- TWiki Guest - 2023-01-20

Discussion and Answer

Enclose your code in >> and <<. Here is a test, do a Raw View to see:

A1 B1 C1 D1
A2 B2
  • Bullet
  • list
  • is
  • possible

C2 with embedded code:
[ 'Hello', 'World' ].forEach(str => {
  let result = str.split('').reverse().join('');
  console.log(result);
});
end C2

D2
A3 B3 C3 D3

Read details in TablePlugin.

-- Peter Thoeny - 2023-01-21

Thank you very much!!! smile

-- TWiki Guest - 2023-01-23

Thank you very much!!! smile

-- TWiki Guest - 2023-01-23

      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 How to embed code via Syntax Highlighting Plugin in table?
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-23 - TWikiGuest
 
  • 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.