Jump to content


Photo

linebreaks in field description?


  • Please log in to reply
5 replies to this topic

#1 evan

evan

    Jr. Member

  • Members
  • PipPip
  • 42 posts
  • 10

Posted 08 December 2011 - 02:01 PM

Hi all,

Is any kind of formatting possible in the field description?  Linebreaks would make it more readable for lengthier descriptions about how information should be entered.  Thanks!

-evan

#2 ryan

ryan

    Hero Member

  • Administrators
  • 5,780 posts
  • 3124

  • LocationAtlanta, GA

Posted 09 December 2011 - 02:21 PM

Currently that's not possible, but I think it would be easy for us to add an nl2br() function to convert newlines to <br /> tags in the field description output. Let me know if that's what you are looking for and I can add it.

#3 evan

evan

    Jr. Member

  • Members
  • PipPip
  • 42 posts
  • 10

Posted 09 December 2011 - 06:00 PM

That's basically what I was thinking, yes.  Thanks!

#4 ryan

ryan

    Hero Member

  • Administrators
  • 5,780 posts
  • 3124

  • LocationAtlanta, GA

Posted 13 December 2011 - 04:05 PM

Linebreaks are now supported in the field descriptions (dev branch). It just runs the description text through PHP's nl2br() before outputting it. While I was there, I also made it so that you can use markdown style links in field descriptions as well. i.e.
[ProcessWire](http://processwire.com)


#5 evan

evan

    Jr. Member

  • Members
  • PipPip
  • 42 posts
  • 10

Posted 06 July 2012 - 11:25 AM

Did this ever make it to the master 2.2 branch? Doesn't seem to be working for me. Thanks!


EDIT: Oops, thought I was supposed to type out newlines, looks like it just recognizes them. Works great!



#6 Martijn Geerts

Martijn Geerts

    Sr. Member

  • Members
  • PipPipPipPip
  • 373 posts
  • 168

Posted 22 July 2012 - 03:14 AM

While I was there, I also made it so that you can use markdown style links in field descriptions as well. i.e.

[ProcessWire](http://processwire.com)


This is great, now we can link to information whatever we want. To explain how to use MarkDown For example.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users