jordandelozier / wysibb

WYSIWYG BBcode editor
http://www.wysibb.com
246 stars 86 forks source link

Added processor property to bb code options. #42

Open limpalex opened 10 years ago

limpalex commented 10 years ago

If present, processor method is called when converting bb to html. It may calculate additional properties. For example, [link={ID}]{SELTEXT}[/link] may be converted to {SELTEXT}, where URL property is somehow calculated (and cached if possible for performance reasons). Notice, that initial ID property should also be stored to perform transform back to bb code. Processor code for this example: processor: function(data) { data.link = '/link?id=' + data.id; }