bsw/jbe@0: local draft = param.get("draft", "table") poelzi@160: local source = param.get("source", atom.boolean) bsw/jbe@0: bsw@718: ui.container{ bsw@718: attr = { class = "draft_content wiki" }, bsw/jbe@0: content = function() bsw@718: if source then bsw@718: ui.tag{ bsw@718: tag = "pre", bsw@718: content = draft.content bsw@718: } bsw@718: else bsw/jbe@1309: if draft.formatting_engine == "html" or not draft.formatting_engine then bsw/jbe@1309: slot.put(draft.content) bsw/jbe@1309: else bsw/jbe@1309: slot.put(draft:get_content("html")) bsw/jbe@1309: end bsw@718: end bsw/jbe@0: end bsw/jbe@0: }