Closed jgarte closed 2 years ago
Hi. Would require a Spinneret renderer.
The equivalent of this file: https://github.com/mmontone/cl-forms/blob/master/src/renderer/who.lisp, but using Spinneret instead of cl-who.
I think you may be able to mix both cl-who and spinneret,though. If both libraries write to the same output stream..
I have an example of using cl-who renderer and spinneret at the same time:
(forms:defform my-form ()
((input :string)))
(let ((form (forms:get-form 'my-form)))
(with-output-to-string (*html*)
(spinneret:with-html
(let ((cl-forms.who:*html* *html*)
(spinneret:*html* *html*))
(:h1 "This is my form")
(forms:with-form-renderer :who
(forms:render-form form))
(:ul
(loop for i from 1 to 10
do (:li (princ-to-string i))))))))
There may be a cleaner way of connecting things. Feels like a macro should be implemented there ..
But this works. cl-who html stream, cl-forms.who:*html*
and spinneret:*html*
are all bound to the same output stream.
Hi could this library support spinneret?
If so, what would be required?