-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #585
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
imixs-office-workflow-app/src/main/webapp/pages/workitems/parts/markdown.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" | ||
xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" | ||
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:h="http://xmlns.jcp.org/jsf/html"> | ||
|
||
|
||
|
||
<ui:fragment rendered="#{!readonly}"> | ||
<h:inputTextarea value="#{workitem.item[item.name]}" pt:data-item="#{item.name}" | ||
required="#{item.required?validationController.required:false}" rendered="#{!item.readonly}" | ||
disabled="#{item.disabled}" /> | ||
|
||
</ui:fragment> | ||
<ui:fragment rendered="#{readonly}"> | ||
<h:inputHidden pt:data-id="markdown_hidden_input" value="#{workitem.item[item.name]}" /> | ||
<script type="text/javascript"> | ||
/*<![CDATA[*/ | ||
$(document).ready(function () { | ||
var elements = document.querySelectorAll('[data-id="markdown_hidden_input"]'); | ||
var mdHtml = marked.parse(elements[0].value); | ||
const divElement = document.querySelector('.imixs-markdown-output'); | ||
divElement.innerHTML = mdHtml; | ||
}); | ||
/*]]>*/ | ||
</script> | ||
<div class="imixs-markdown-output"></div> | ||
</ui:fragment> | ||
|
||
</ui:composition> |