ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Converting <br /> => <li>

November 15, 2010 12:23pm

Subscribe [2]
  • #1 / Nov 15, 2010 12:23pm

    koala kid

    72 posts

    Is there an EE way to convert the BRs in a textarea field into a regular UL? I know I can do it via PHP functions but that means I have to enable PHP for all of my template pages.

    If not can you suggest a workaround?

    Thanks.

    [Mod Edit: Moved to the CodeShare Corner]

  • #2 / Nov 15, 2010 12:36pm

    Neil Evans

    1403 posts

    your trying to make a list i take it, and currently using a textarea where you want each newline to be a new list item.
    Many options… but… depends on your skill levels…

    1. The way i would do it - use Pixel and Tonics Matrix field
    2. Use a WYSIWYG editor and make the list in HTML as you enter it
    3. Create a plugin to take your data from your field and convert it to a list. This will save you doing the same thing in each template, over and over enabling php. For your use, quite a simple way, and probably youir best option if you already have a lot of data in the db.

  • #3 / Nov 15, 2010 1:08pm

    koala kid

    72 posts

    Thanks for the suggestions. I’m starting with a fresh site so I think I’ll use the WYSIWYG editor option but the plugin idea is interesting. Cheers.

  • #4 / Nov 15, 2010 1:09pm

    Neil Evans

    1403 posts

    fresh site matrix is the easiest (although paid). you might want to search Devot-ee.com too as there might be some free alternatives to matrix or list field types.

  • #5 / Nov 15, 2010 4:16pm

    koala kid

    72 posts

    Have you much experience using TinyMCE with EE? Do they play nice?

  • #6 / Nov 15, 2010 5:32pm

    Neil Evans

    1403 posts

    TinyMCE is okay - i think there is a free add-on for it too (go to devot-ee)
    But i am personally not a fan of it. It often breaks complicated HTML layouts, and clients seemt o mess it up quite easily.
    I prefer CKEditor - there is a free integration of this, or a paid powerful version (WYGWAM by pixel and tonic).

  • #7 / Nov 15, 2010 6:06pm

    koala kid

    72 posts

    WYGWAM looks like good value for $35. Probably roll with that solution. Thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases