PHPackages                             yoanmalie/kirbytextwrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. yoanmalie/kirbytextwrap

ActiveKirby-plugin[Templating &amp; Views](/categories/templating)

yoanmalie/kirbytextwrap
=======================

Kirby plugin to get rid of the kirbytext() &lt;p&gt; enclosing tag, or replace them and add HTML attributes. It Keep the kirbytag working.

1.2.0(7y ago)718[2 issues](https://github.com/yoanmalie/kirbytextWrap/issues)MITPHP

Since Jan 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yoanmalie/kirbytextWrap)[ Packagist](https://packagist.org/packages/yoanmalie/kirbytextwrap)[ RSS](/packages/yoanmalie-kirbytextwrap/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

KirbytextWrap plugin for Kirby
==============================

[](#kirbytextwrap-plugin-for-kirby)

[![GitHub release](https://camo.githubusercontent.com/cef4c2e4f7bf725b926a33e2c91fb0a64f164636e2f4881b856395c2a09e0850/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f796f616e6d616c69652f6b6972627974657874777261702e7376673f6d61784167653d31383030)](https://camo.githubusercontent.com/cef4c2e4f7bf725b926a33e2c91fb0a64f164636e2f4881b856395c2a09e0850/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f796f616e6d616c69652f6b6972627974657874777261702e7376673f6d61784167653d31383030) [![License](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667) [![Kirby Version_2](https://camo.githubusercontent.com/436961f901b7d6095097f0a437b22432a11c1c1659b8b425904d768df8bbe752/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d76322d626c61636b2e737667)](https://camo.githubusercontent.com/436961f901b7d6095097f0a437b22432a11c1c1659b8b425904d768df8bbe752/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d76322d626c61636b2e737667) [![Kirby Version_3](https://camo.githubusercontent.com/60314e9d5e94eab374de7ec38af6561c340f48b46441214c77bd69fd53120a0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d76332d626c61636b2e737667)](https://camo.githubusercontent.com/60314e9d5e94eab374de7ec38af6561c340f48b46441214c77bd69fd53120a0f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d76332d626c61636b2e737667)

Kirby Plugin to remove or replace the ` ` enclosing tag and set HTML attributes. This will keep your kirbytag working.
Support both Kirby 2 and Kirby 3 version!

---

[![banner](banner-kirbytextwrap.png)](banner-kirbytextwrap.png)

How it works?
-------------

[](#how-it-works)

In your template, `$page->title()->kirbytextWrap()` will give you the same as kirbytext() without the `` enclosing tag. This work also with the short `ktw()` alias.

### Do much more

[](#do-much-more)

`$page->title()->kirbytextWrap('h1')` Will replace the `` enclosing tag by ``.
`$page->title()->kirbytextWrap('h1', ['class' => 'title'])` Will replace the `` enclosing tag by `` and add a class attribute with its value.

Put as many attributes as you want, you better create a variable for your array of attributes.

```
