Skip to content

Commit

Permalink
[#69702] add an example custom directive
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Dec 3, 2024
1 parent 8d4abb5 commit b5a40f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@
},
];

let exampleCustomDirectives = [
{
target: "bold",
transform: (_, data) => `<b style="white-space: pre-wrap;">${data.body}</b>`,
},
];

let exampleTransforms = [
{
// Other repo issue links
Expand Down Expand Up @@ -247,6 +254,7 @@
color,
},
customRoles: exampleCustomRoles,
customDirectives: exampleCustomDirectives,
includeButtons: defaultButtons.concat([
{
text: "Custom button",
Expand Down

0 comments on commit b5a40f4

Please sign in to comment.