For Web Developers

Maintenance-free Text Only links on your pages

TextOnly

Textise offers an easy method for creating real-time text-only versions of web pages without having to create and maintain separate code. Just include the following in your pages:


<a href="javascript:location.href = 'http://www.textise.net/showText.aspx?strURL=' + escape(escape(location.href))">Text Only</a>

If you’d like the text only page to appear in a new tab or page, use:


<a href="javascript:var textiseWin = window.open('http://www.textise.net/showText.aspx?strURL=' + escape(escape(location.href)), '_blank');textiseWin.focus();">Text Only (new tab/window)</a>

The State of Oregon official site and the Suffolk County NY Government Site already use Textise for their text-only functionality. You can find other sites using Textise on the Showcase page.


The Textise web service

Alternatively, the core Textise code is exposed as a web service:


http://www.textise.net/textiseService/Service1.asmx/stripHTML
?strURL=https://textise.wordpress.com
&linkStyle=0
&guid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
&strContent=""
&retainFrm="0"
&retainTbl="0"
&retainScr="0"
&retainStandard="0"

Replace https://textise.wordpress.com with a URL of your choice, add your GUID* and you’re off. The final 5 params have been implemented for Textise Pro and should be left as is for normal use, but feel to free to experiment with them. strContent, for example, allows you to send a string of HTML for conversion rather than a URL.

linkStyle values are as follows:


0 = "Textised" links (lead to text-only pages)
1 = "Original" links (lead to non-Textised pages)
2 = All links converted to plain text

From an IDE like Visual Studio, you’ll need to add a web reference to the service:


http://www.textise.net/textiseService/Service1.asmx?WSDL

*If you don’t have a GUID, write to me via the Contact Page, with some details on how to intend to use the web service, and I’ll send you one.


Controlling what gets Textised

Not everything in a web page converts nicely to text. All those links in your headers, for example, look pretty clumsy when displayed text-only. To solve this problem, I’ve added a class, “notextise”, so you can control what gets converted and what gets excluded by Textise. Here’s an example:


This text will convert to text but

.
This text will appear.

You can add the “notextise” class to div, span and p tags. Note that Textise expects only the tag, one space and class=”notextise”, as in the example.

I’ve also created a page to illustrate the use of “notextise”. Have a look at http://www.textise.net/testNoTextise.htm, then Textise it to see how it works.

With judicious use of “notextise” you can create good-looking text-only versions of your pages. It’s also useful if you want to offer your customers a printer-friendly option.


Pricing

Please note that adding “text only” links to your pages may make you liable for payment. For details on our pricing model, please visit the Pricing Page.

4 responses to “For Web Developers

  1. Pingback: New Page For Web Developers | Textise Dev Blog

  2. Pingback: Subscriptions | Textise Dev Blog

  3. Pingback: One Direction | Textise Dev Blog

  4. Hello

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s