Jump to content

Styling image description in admin


AnotherAndrew
 Share

Recommended Posts

I was just about to reply to this and you beat me to it. :) But I'll continue my original reply anyway– I was going to say that the 'description' field that goes with each image is really intended to be for the 'alt' tag of the image (though not limited to it). But as a result, it's not something that is meant to have markup in it by default. However, if you want to have markup in it there are many ways to go. The way I would probably do it is to use markdown or textile codes in the description, and then run it through that textformatter at output time so that it converts to HTML:

<?php
$markdown = $modules->get('TextformatterMarkdownExtra'); 
$description = $page->image->description; 
$markdown->format($description); 
echo $description; // outputs HTML
Link to comment
Share on other sites

You are missing out on some good stuff if you haven't used these before. First off, textile and markdown are considered lightweight markup languages. This is the kind of stuff that you want clients to use in places where they might otherwise have to use HTML tags:

About LMLs: http://en.wikipedia.org/wiki/Lightweight_markup_language

More on Markdown: http://en.wikipedia.org/wiki/Markdown

More on Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...