| | |
| | | |
| | | public MarkdownTextArea(String id, final IModel<String> previewModel, final Label previewLabel) { |
| | | super(id); |
| | | this.repositoryName = repositoryName; |
| | | setModel(new PropertyModel(this, "text")); |
| | | add(new AjaxFormComponentUpdatingBehavior("onblur") { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | return; |
| | | } |
| | | String html = MarkdownUtils.transformGFM(GitBlitWebApp.get().settings(), text, repositoryName); |
| | | previewModel.setObject(html); |
| | | String safeHtml = GitBlitWebApp.get().xssFilter().relaxed(html); |
| | | previewModel.setObject(safeHtml); |
| | | } |
| | | |
| | | public String getText() { |