Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for text param for Inset text #1113

Merged
merged 7 commits into from
Feb 12, 2025
Merged

Conversation

frankieroberto
Copy link
Contributor

@frankieroberto frankieroberto commented Feb 5, 2025

This adds support for a text param for the Inset text component, for use where only a single paragraph is included. Resolves #1108

This means that instead of:

{{ insetText({
  html: "<p>This is a note.</p>"
}) }}

you can do this:

{{ insetText({
  text: "This is a note."
}) }}

When the text param is used, the text is enclosed by paragraph tags.

Checklist

This adds support for a `text` param for the Inset text component, for use where only a single paragraph is included.

This means that instead of:

```njk
{{ insetText({
  html: "<p>This is a note.</p>"
}) }}
```

you can do this:

```njk
{{ insetText({
  text: "This is a note."
}) }}
colinrotherham
colinrotherham previously approved these changes Feb 5, 2025
edwardhorsford
edwardhorsford previously approved these changes Feb 5, 2025
Co-authored-by: Colin Rotherham <[email protected]>
colinrotherham
colinrotherham previously approved these changes Feb 11, 2025
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hadn't realised the approval was cleared

If you've double checked indent(2) was correct I'm happy!

colinrotherham
colinrotherham previously approved these changes Feb 12, 2025
@anandamaryon1 anandamaryon1 merged commit 22da3ed into main Feb 12, 2025
5 checks passed
@anandamaryon1 anandamaryon1 deleted the inset-text-text branch February 12, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inset text does not support a text param
4 participants