I'm trying to figure out how to create a custom filter that will wrap the existing content in <code> tags.

Just like in this modules description I want to...

You can use simple replacements or use php code to write more powerfull things(like use it to highligth code with geshi).

My thought is that I can run the geshi filter module after this one since my content with now be wrapped in the necessary <code> tags.

I've created a filter but now I'm stuck at the part where I'm supposed to add rules.
http://awesomescreenshot.com/04devdz36

Can anyone help me out, or point me in the right direction on this?

Comments

yukare’s picture

On my site i use custom filter to highlight source code using some php code on a filter, if you want i can make te code available.

zterry95’s picture

Component: Code - CustomFilter class » Code
Issue summary: View changes
Status: Active » Closed (outdated)