> This results in a "hello" appearing at the end of each row of my
> table, as expected, but then also the text "hellohellohello" appearing
> above my table.  Am I not supposed to use with-html for the :reader
> argument in a view?

WITH-HTML writes directly to the output stream. This means that every
time the reader function is called by Weblocks, your HTML gets emitted.

Use WITH-HTML-TO-STRING (in -dev) or WITH-HTML-OUTPUT-TO-STRING (s)
instead.

I think the default presentation will escape your HTML too, so
you need an appropriate presentation that lets raw HTML through:


(defclass raw-html-presentation (text-presentation)
  ())

(defmethod render-view-field-value (value (presentation raw-html-presentation)
                                    field view widget obj &rest args
                                    &key highlight &allow-other-keys)
  (let ((printed-value (apply #'print-view-field-value value presentation field 
view
widget obj args)))
    (with-html
      (:span :class "value"
             (str (if highlight
                      (highlight-regex-matches printed-value highlight)
                      printed-value))))))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to