bsw/jbe@0: local draft = param.get("draft", "table") poelzi@160: local source = param.get("source", atom.boolean) bsw/jbe@0: bsw/jbe@0: ui.form{ bsw/jbe@0: attr = { class = "vertical" }, bsw/jbe@0: record = draft, bsw/jbe@0: readonly = true, bsw/jbe@0: content = function() bsw/jbe@0: bsw@2: ui.container{ bsw/jbe@4: attr = { class = "draft_content wiki" }, bsw@2: content = function() poelzi@160: if source then poelzi@160: ui.tag{ poelzi@160: tag = "pre", poelzi@160: content = draft.content poelzi@160: } poelzi@160: else poelzi@160: slot.put(draft:get_content("html")) poelzi@160: end bsw@2: end bsw@2: } bsw/jbe@0: end bsw/jbe@0: }