RTF2HTML plugin

Because i needed to convert RTF fields to HTML and could not find/create reliable code to do that task I created a plugin, maybe others may need similar functionality. Just place the plugin in the servoy plugin folder and you’re ready to go.
The call to the plugin is very simple
var vRtf = rtf_field;
var vHtml = plugins.Rtf2Html.getHtml(vRtf);

[attachment=0]rtfhtml.jar[/attachment]
[attachment=1]Untitled-1.png[/attachment]

rtfhtml.jar (4.33 KB)

Peter de Groot:
Because i needed to convert RTF fields to HTML and could not find/create reliable code to do that task I created a plugin, maybe others may need similar functionality. Just place the plugin in the servoy plugin folder and you’re ready to go.
The call to the plugin is very simple
var vRtf = rtf_field;
var vHtml = plugins.Rtf2Html.getHtml(vRtf);

[attachment=0]rtfhtml.jar[/attachment]
[attachment=1]Untitled-1.png[/attachment]

Checkout Bob Cusik’s stuff on http://www.clickware.com/servoy_tutorials.php?ma=3

Hi Peter!

Great to see your plugin and very nice of you to share!
Kahuna pointed that there is a solution available at Clickware, but it is a bit old I think (I don’t know if Bob updated it lately for 4.1) and a lot less portable than a nicely self-contained plugin that you can use just anywhere…

There are big advantages to modules in Servoy most of the time, but one of the biggest advantages of plugins vs modules (even thought modules are way easier to write :) is encapsulation.

  • See this thread on the Servoy Stuff blog for more on that topic, if you are interested…

Another advantage of plugin that I just thought of is that a plugin will be uploaded once and after that it will live in the java cache of the client, when a module will need to be uploaded for each session.

So once again, thanks for you sharing your plugin!

Cheers,

Just to give balance to Patrick’s comment:
(These are no doubt debatable. IMHO).

The biggest disadvantage to a plugin is perhaps that it may not be open source code.

The second biggest disadvantage about plugins is that jar compatibility (versions that is) may be problematic.

These are the two top most issues that I have in the Servoy World at any rate.

Having said that I think that plugins do fill a void.

Plugins that are open source are better for all if the originator moves on.

Plugins that are licensable are a vey good choice since it gives developers a motivation to continue to support their clients.

Now if only Servoy could keep on adding more functionality into the baseline by “using” open source plugins then I think that might be a path worth investigating… 8)