SID-02500: How to embed code via Syntax Highlighting Plugin in table?
| Status: |
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
|
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!!!
--
TWiki Guest - 2023-01-23
Thank you very much!!!
--
TWiki Guest - 2023-01-23
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.