Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Creating a output formatter plug-in
theallan
New
Is there a way to create an output formatter? I know that we can create plug-ins for the input formatter using something like
but if I understand correctly, that's the only formatter that is then used (I want to keep the current one) and it will only apply to new posts.
Basically want I want to do is look through posts for keywords and convert them into links. Is that possible?
Thank,
Allan
Gdn::FactoryInstall('DtFormatter', 'DtKeywordsPlugin', __FILE__, Gdn::FactorySingleton);
but if I understand correctly, that's the only formatter that is then used (I want to keep the current one) and it will only apply to new posts.
Basically want I want to do is look through posts for keywords and convert them into links. Is that possible?
Thank,
Allan
0
Best Answer
-
x00 MVPYes this is possible. You don't need a formatter. Have a look at the quotes plugin for clues.
Personally however you could do it with javascript if you pass the keywords. Less overhead. However I'm not giving programming lessons. Basic knowledge of jQuery, would do it.grep is your friend.
0
Answers
Personally however you could do it with javascript if you pass the keywords. Less overhead. However I'm not giving programming lessons. Basic knowledge of jQuery, would do it.
grep is your friend.
I did think about using jQuery, but figured that that would probably be more overhead (certainly for the client) and would likely result in a flicker from the unrendered state to the rendered state, which can be a but frustrating at times.
All sorted now - thanks again!
Allan
grep is your friend.