On Friday, February 24, 2023 at 5:47:50 AM UTC+1 yasai ya wrote:
Thank you!
Your post was very helpful.
But it looked like the CSS wouldn't apply without the macro tiddler was
visible.
Defining some CSS code in an HTML STYLE tag is very useful for debugging
and testing, but it should *not be
please see [tw5] Re: copy button in each code block - Google Group (Read
Only) - Talk TW (tiddlywiki.org)
<https://talk.tiddlywiki.org/t/tw5-re-copy-button-in-each-code-block/6293/5>
Ask your question in new official forum talk.tiddlywiki.org
On Wednesday, June 7, 2023 at 6:24:47 AM UT
Updated.
```
\define code(tx)
table.mycodeblock {
border: none;
margin: 0px;
vertical-align: middle;
display: inline-table;
}
table.mycodeblock pre {
margin: 0px;
}
table.mycodeblock td {
border: none;
padding: 0.1em;
position: relative;
}
table.mycodeblock button {
Updated.
\define code(tx) table.mycodeblock { border: none; margin: 0px;
vertical-align: middle; display: inline-table; } table.mycodeblock pre {
margin: 0px; } table.mycodeblock td { border: none; padding: 0.1em;
position: relative; } table.mycodeblock button { position: absolute; left:
Can someone explain how to use this?
понедельник, 27 февраля 2023 г. в 13:00:01 UTC+3, yasai ya:
> Sorry, it wasn't fixed at all, but finally I fixed the problem.
>
> param=<<__tx__>>
> ↓
> param={{{ [<__tx__>trim[]] }}}
>
>
>
> Full code
> ---
>
>
> \define code(tx)
>
>
> table.mycodeblock {
Sorry, it wasn't fixed at all, but finally I fixed the problem.
param=<<__tx__>>
↓
param={{{ [<__tx__>trim[]] }}}
Full code
---
\define code(tx)
table.mycodeblock {
border: none;
margin: 7px 0 11px;
}
table.mycodeblock pre {
margin: 0;
}
table.mycodeblock td {
border: none;
Thank you!
Your post was very helpful.
But it looked like the CSS wouldn't apply without the macro tiddler was
visible.
So I modified it like this.
```
\define code(tx)
table.mycodeblock {
border: none;
margin: 7px 0 11px;
}
table.mycodeblock pre {
margin: 0;
}
table.mycodeblock
I managed to do it with just macros and CSS. One thing I could not avoid is
copying line breaks before and after the code. Hope there will be a plugin
someday that will overcome that, as well as do away with the table wrapper.
Here is a self-contained demo tiddler.
\define code(tx)
```$tx$
That works, thanks. Would be great though, to have the button appear inside
the block, on hover.
On Saturday, April 28, 2018 at 2:31:13 AM UTC-7, BurningTreeC wrote:
>
> hi @Rustem
>
> you could just create a macro in a tiddler say $:/_macros tagged with
> $:/tags/Macro with the content:
>
>
hi @Rustem
you could just create a macro in a tiddler say $:/_macros tagged with
$:/tags/Macro with the content:
\define code(text)
<>
```
$text$
```
\end
in your tiddlers just write:
<>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To
Yes, I mean code blocks, of course.
I think the place to add the button is inside
`CodeBlockWidget.prototype.render`,
but not sure how to do it exactly.
On Wednesday, March 14, 2018 at 5:27:47 AM UTC-7, Matthew Lauber wrote:
>
> Pretty sure he means everything enclosed in triple backticks,
11 matches
Mail list logo