Forum closed. New forum available at

A custom tag with visual effects, possible?

Support forum for WYMeditor.

A custom tag with visual effects, possible?

Postby gices on Wed Aug 20, 2008 6:35 pm


I'm building an application and i like the idea of what wymeditor does as it's not too much clustered with things i'm never going to use. I want to use a custom tag though and here's the scenario: i've got a table in my database which stored prices for products, now these prices are subject to change but i need to reference them within articles. I'm thinking of creating a <price> tag which will be used as follows:

....this product will cost you <price>11</price> if you buy it online...

where 11 is the id of the column from which to retrieve the price (not the price itself!).

This would give me the flexibility i need because when i'm going to change prices, it would be reflected in the article by looking up the latest value for the price from the database and replacing <price>11</price> with the current price. I hope you are getting the picture.

I'll probably let the users click on a button to select the item they want and inject the code (<price>11</price) into the html of wymeditor. That's going to go on the html source but when i go into visual i want the users to actually see the price. Is there a way of doing that?

Posts: 2
Joined: Wed Aug 20, 2008 2:05 pm

Re: A custom tag with visual effects, possible?

Postby jfh on Wed Aug 20, 2008 7:04 pm

I'd suggest using the link element, instead of a custom tag (which won't be easily handled by the editor), and set its title attribute to 'price'.
You can then e.g. use a XSLT at the server side.

As soon as spans and classes on inline elements will be supported, it will even be easier (e.g. <span class="price">11</span>).
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests