Forum OpenACS Development: Re: Rich text input

Collapse
25: Re: Rich text input (response to 7)
Posted by xx xx on
Lars,

Concerning your remark on 26/1 (10.07): do <a href=>-tags work properly with richtext widgets?

I'm using the richtext widget with 4.6.3 (final) but still get this as output:

<p><a href="http://test.nl">link</a></p>
<input type="hidden" name="pa" value="<a href="http://test.nl">link</a>"><input type="hidden" name="pa.format" value="text/enhanced">

I would like to get rid of the <p> as well as the resulting ' link"> ' displayed in the browser.

Collapse
26: Re: Rich text input (response to 25)
Posted by Lars Pind on
The resulting ' link"> ' is a quoting bug, which I've just now fixed on HEAD:

http://cvs.openacs.org/cvs/openacs-4/packages/acs-templating/tcl/richtext-procs.tcl.diff?r1=1.5&r2=1.6&f=h

The <p> ... </p> around the contents is an attempt to make the  output proper HTML, but it does result in annoying whitespace.

Any better suggestion? Should we resort to open-ended <p>'s between paragraphs like we used to?

The code that does this is these two lines in util_convert_line_breaks_to_html in packages/acs-tcl/tcl/text-html-procs.tcl, in case you want to take it out on your own system:

    # Wrap P's around paragraphs
    set text "<p>$text</p>"
    regsub -all {([^\n\s])\n\n([^\n\s])} $text {\1</p><p>\2} text

/Lars

Collapse
27: Re: Rich text input (response to 26)
Posted by xx xx on
Thanks for fixing this bug.

As far as I can see "<p> ... </p> around the contents" prevents us from using this formwidget inline. An inline_p switch would therefore be useful, IMO.