[dokuwiki] Re: List syntax

  • From: "Gabriel Birke" <Gabriel.Birke@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Fri, 8 Jun 2007 10:42:23 +0200

The behavior you describe is the browser default for textareas. You could
change this behavior by adding the inofficial, proprietary but universally
supported attribute 'wrap="off"' to the textarea tag. Note however, that
long texts will appear on one line!

You could achieve this in many ways: editing the template code for the input
form is the most radical solution.
A better solution would be a bookmarklet to turn off the wrapping when
needed. The following lines are really one line that should be saved as a
bookmark:

javascript:(function(){var
w=document.getElementById('wiki__text');w.setAttribute("wrap","off");var
parNod=w.parentNode,nxtSib=w.nextSibling;parNod.removeChild(w);parNod.insert
Before(w,nxtSib);})()

for turning wrap on again:

javascript:(function(){var
w=document.getElementById('wiki__text');w.removeAttribute("wrap");var
parNod=w.parentNode,nxtSib=w.nextSibling;parNod.removeChild(w);parNod.insert
Before(w,nxtSib);})()

Works in FF and IE7 (couldn't test with IE 6).

Gabriel

> -----Ursprüngliche Nachricht-----
> Von: dokuwiki-bounce@xxxxxxxxxxxxx 
> [mailto:dokuwiki-bounce@xxxxxxxxxxxxx] Im Auftrag von Adrian 
> Sai-wah Tam
> Gesendet: Freitag, 8. Juni 2007 09:59
> An: dokuwiki@xxxxxxxxxxxxx
> Betreff: [dokuwiki] Re: List syntax
> 
> Yes, I know the \\ trick, but it is not what I mean because I am not 
> meaning to break a line into two on the browser. My problem is this: 
> When you have a very very long list and each bullet on the 
> list is very 
> long line, you will find problem on editing because you lost the 
> structure on the "textarea". What I want is to maintain the structure 
> even when you are editing and the example I gave below means for the 
> editing screen, not the output.
> 
> - Adrian.
> 

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: