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.

How can I disable HTML inside the field instructions

July 10, 2012 3:14am

Subscribe [2]
  • #1 / Jul 10, 2012 3:14am

    Rodscha

    35 posts

    I came across this “issue” a few times already: I’d like to explain to a client how to use a few pieces of HTML code inside the field instructions. When I create a new channel field I’d like to, for example, explain how to use list item tags. As soon as I put those tags inside the instructions they’ll show as actual list items (not as code) on the Publish page. Great would be a code tag (

    <li>list item</li>

    ) that I have available writing this topic. Is that possible?

  • #2 / Jul 10, 2012 4:03am

    mark186282

    290 posts

    Fortunately, you don’t have to turn off HTML, you can simply use HTML attributes to get the intended results:

    (using pastie because the forums are converting the code to be displayed as rendered HTML, causing further confusion)

    Simple version:
    http://pastie.org/4230386

    here’s with some colorization:
    http://pastie.org/4230390

    I tried the full colorized version in the descriptions and it came out looking good.

     

  • #3 / Jul 10, 2012 1:27pm

    Rodscha

    35 posts

    Thanks Mark, this worked fine for me. I wish there would be a tool that converts “regular” HTML automatically since it’s quite a bit of work to write it manually (especially with color highlights). But again, this is great and exactly what I was looking for.

  • #4 / Jul 10, 2012 1:59pm

    mark186282

    290 posts

    Thanks Mark, this worked fine for me. I wish there would be a tool that converts “regular” HTML automatically since it’s quite a bit of work to write it manually (especially with color highlights). But again, this is great and exactly what I was looking for.


    here’s a secret:

    use a wysiwyg editor (such as dreamweaver or whatever) to write the html code in… then view the source.

    If you don’t have a wysiwyg editor, then just type it in a test page with one installed:
    http://www.tinymce.com/tryit/full.php

    Type in your HTML to the dialog box, then click the “HTML” button that views the source… then copy and paste that source code.

    I hope this helps!

  • #5 / Jul 11, 2012 11:56am

    Kevin Smith

    4784 posts

    Looks like Mark was able to offer some good suggestions here. Thanks Mark! Is there anything else you need help with, Rodscha?

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

ExpressionEngine News!

#eecms, #events, #releases