Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This is an idea that came through my mind, and I would like to know if possible and how to approach it if so...

I have my own wordpress framework that I use as based for all my projects, I manage the content position generated in the content box using shortcodes which respond to an especific div with a location...

Said this, sometimes I find myself into a mess really hard to understand, for sample:

[one_column] content [/one_column] [one_column] content [/one_column] [one_column] content [/one_column] [one_column] content [/one_column]

when the among of text is big, is hard to find where the shortcodes are placed.

So, is there any way to highlight the shortcode (like with a different color) into the content box? or maybe easier, is there any way to indent the content and keep that indent once I save or update the post?

I would like to hear you opinion,

Thanks in advanced.

Kind Regards.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The only way I can think of doing this is with JavaScript to regex your parameter and apply a css style to them on the fly.

Check out these jquery plugin for ideas:
https://github.com/jbr/jQuery.highlightRegex
http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html

share|improve this answer
    
thanks a ton, looks like what I'm looking for! I'd appreciate you help –  andresmijares25 Apr 3 '12 at 7:42
    
hi @andrewkthx - did you ever get this working? if you did i'd love to find out how! i've tried jQuery highlight with a regex (/\[.*\]/ig), it works in other places but not in the editor. –  Simon Blackbourn Jan 21 '13 at 0:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.