Skip to content

Commit

Permalink
upgrade mkdocs-pycafe and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSkovMadsen committed Nov 29, 2024
1 parent f039d17 commit b78a455
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/copy-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `CopyButton` can be used to copy-paste any **string `value`**:

```{.python pycafe-embed pycafe-embed-height="100px" hl_lines="3"}
```{.python pycafe-embed pycafe-embed-height="100px" pycafe-iframe-allow="clipboard-write; clipboard-read" hl_lines="3"}
from panel_copy_paste import CopyButton
CopyButton(value="Hello World").servable()
Expand Down
8 changes: 4 additions & 4 deletions docs/paste-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The `PasteButton` can be used to paste any **string `value`**:

```{.python pycafe-link pycafe-embed-height="100px" hl_lines="2,7"}
```{.python pycafe-link pycafe-embed-height="100px" hl_lines="6-7"}
import panel as pn
from panel_copy_paste import PasteButton
Expand All @@ -17,7 +17,7 @@ pn.Column(button, editor).servable()

If you want a **custom button**, it's also possible:

```{.python pycafe-link hl_lines="4-5"}
```{.python pycafe-link hl_lines="7-8"}
import panel as pn
from panel_copy_paste import PasteButton
Expand All @@ -31,7 +31,7 @@ pn.Column(button, editor).servable()

The `target` is optional and may be a *Widget or Pane like* `Parameterized` class, a `Parameter` or a callable (function). For example you can use a callable to lower case the string before pasting the value to a widget:

```{.python pycafe-link hl_lines="8,9,11"}
```{.python pycafe-link hl_lines="8-11"}
import panel as pn
from panel_copy_paste import PasteButton
Expand All @@ -50,7 +50,7 @@ pn.Column(button, editor).servable()

The `PasteToDataFrameButton` can be used to **paste a *tab-separated* string from Excel** or another application into your data app:

```{.python pycafe-link extra-requirements="pandas" hl_lines="2,7"}
```{.python pycafe-link extra-requirements="pandas" hl_lines="6-7"}
import panel as pn
from panel_copy_paste import PasteToDataFrameButton
Expand Down
Loading

0 comments on commit b78a455

Please sign in to comment.