DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xtermrtf

xtermRTF Plugin

Compatible with DokuWiki

2008-05-05

plugin xterm that supports (basic) RTF formatting (to use with PuTTY) / xterm sachant lire du RTF (basique) (à utiliser avec PuTTY)

Last updated on
2008-10-07
Provides
Syntax

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to xterm

Tagged with code, formatting

Description

  • xterm that supports (basic) RTF formatting (to use with PuTTY)

Syntax

  • No RTF code :
    <xtermrtf>
    -(Thu Sep 11 18:28:58)--(myDevServer:~)-
    [etienne] $ Your "normal" PuTTY paste
    </xtermrtf>
  • RTF code :
    <xtermrtf>
    {\rtf1\ansi\deff0{\fonttbl\f0\fmodern Courier New;}\f0\fs20{\colortbl ;\red0\green0\blue0;\red0\green0\blue187;\red85\green255\blue85;\red85\green85\blue255;\red255\green255\blue255;\red187\green187\blue187;\red0\green0\blue0;}\cf5 \highlight2 -(Thu Sep 11 18:28:58)-\highlight0 -(\cf3 myDevServer:~\cf5 )-\cf1 \highlight1 \par
    \cf0 \highlight0 [\cf4 etienne\cf5 ]\cf0  $ Your "RTF" PuTTY paste\cf1 \highlight1 \par}
    </xtermrtf>

 Screenshot

Remark

  • This is a very basic RTF parser… In fact it just parses PuTTY RTF :-) (doesn't handle bullet lists, arrays, aso…)

How to paste RTF from PuTTY

  • From the Putty configuration panel, check the “Window/Selection/Paste to clipboard in RTF as well as plain text” option (PuTTY v0.60+ needed. Download it on the PuTTY web site).
  • From your PuTTY terminal, select the text you want to copy/paste (it goes into the clipboard).
  • Using a tool like InsideClipboard, select the RTF (Rich Text Format) view (looks like “{\rtf1\ansi\deff0{\fonttbl…}”) and copy it.
  • Now you can paste this RTF code between two <xtermrtf> tags into your article.

Version history

  • 2008-09-11: first one!
  • 2008-10-07: corrects array_merge() warnings (removed unformatted from getAllowedTypes)

Discussion

  • Tell me…
  • This plugin seems not to work properly en my windows system (WAMP), but works with my Linux one. The error message I got (PHP 5.2.6) :
     Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\wamp\www\wiki\lib\plugins\syntax.php on line 134
    • Corrected with version 2008-10-07. Thanks!
    • Not correctly works with my RTF. Please, try:
      <xtermrtf>
      {\rtf1\ansi\deff0{\fonttbl\f0\fmodern Courier New;}\f0\fs20{\colortbl ;\red0\green0\blue0;\red0\green0\blue187;\red0\green187\blue187;\red187\green187\blue187;\red255\green255\blue255;}\cf4 \highlight2 \u9474\'a6\cf1 \highlight3 /.java           \u9474\'a6    512\u9474\'a6Jun  8  2005\cf4 \highlight2 \u9474\'a6\cf1 \highlight1 \par
      \cf4 \highlight2 \u9474\'a6\cf5 /.mc             \cf4 \u9474\'a6\cf5     512\cf4 \u9474\'a6\cf5 Nov 26 17:48\cf4 \u9474\'a6\cf1 \highlight1 \par
      \cf4 \highlight2 \u9474\'a6\cf5 /.ssh            \cf4 \u9474\'a6\cf5     512\cf4 \u9474\'a6\cf5 Jul 14  2008\cf4 \u9474\'a6\cf1 \highlight1 \par
      \cf4 \highlight2 \u9474\'a6\cf5 /.sunw           \cf4 \u9474\'a6\cf5     512\cf4 \u9474\'a6\cf5 Jun 18  2008\cf4 \u9474\'a6\cf1 \highlight1 \par
      \cf4 \highlight2 \u9474\'a6\cf5 /1               \cf4 \u9474\'a6\cf5     512\cf4 \u9474\'a6\cf5 Oct 22 19:21\cf4 \u9474\'a6\cf1 \highlight1 \par
      \cf4 \highlight2 \u9474\'a6\cf5 /InstallShield   \cf4 \u9474\'a6\cf5     512\cf4 \u9474\'a6\cf5 Oct 30 19:26\cf4 \u9474\'a6}</xtermrtf>

It shows as

but should as

img24.imageshack.us_img24_4039_capture08122009000933.jpg

plugin/xtermrtf.txt · Last modified: 2010-03-03 11:07 by 145.242.11.4