Skip to content

viewers (transform-fn?) should be able to set form metadata #404

Open
@sritchie

Description

@sritchie

This came up in Slack...

q: is it possible in a form like this

(nextjournal.clerk.viewer/with-viewer
  {:transform-fn (fn [x]
                   (clerk/mark-presented x))
   :render-fn
   '(fn [form]
      (v/html
       [:div.rounded-lg.p-4.text-xs.font-sans.bg-blue-100.border-2.border-blue-200.dark:bg-slate-800.dark:border-slate-700
        form]))}
  "cake2")

to do something in transform-fn that will automatically apply

^{:nextjournal.clerk/visibility {:code :hide}}

The title of the issue hints at a more general solution, but I'm not sure how to do it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions