-
-
-
-
-
diff --git a/ui-ngx/src/app/shared/components/markdown-editor.component.scss b/ui-ngx/src/app/shared/components/markdown-editor.component.scss
index a4149c54d7..1a1cf57a63 100644
--- a/ui-ngx/src/app/shared/components/markdown-editor.component.scss
+++ b/ui-ngx/src/app/shared/components/markdown-editor.component.scss
@@ -58,20 +58,15 @@
overflow: auto;
height: 100%;
}
- .buttons-panel {
- position: absolute;
- top: 5px;
- right: 24px;
- z-index: 1;
- button.edit-toggle {
- min-width: 32px;
- min-height: 15px;
- padding: 4px;
- margin: 0;
- font-size: .8rem;
- line-height: 15px;
- color: #7b7b7b;
- background: rgba(220, 220, 220, .35);
- }
+ button.panel-button {
+ background: rgba(220, 220, 220, .35);
+ align-items: center;
+ vertical-align: middle;
+ min-width: 32px;
+ min-height: 15px;
+ padding: 4px;
+ font-size: .8rem;
+ line-height: 15px;
+ color: #7b7b7b;
}
}
diff --git a/ui-ngx/src/app/shared/components/markdown-editor.component.ts b/ui-ngx/src/app/shared/components/markdown-editor.component.ts
index 919c621620..fee904b60d 100644
--- a/ui-ngx/src/app/shared/components/markdown-editor.component.ts
+++ b/ui-ngx/src/app/shared/components/markdown-editor.component.ts
@@ -40,6 +40,8 @@ export class MarkdownEditorComponent implements OnInit, ControlValueAccessor, On
@Input() readonly: boolean;
+ @Input() helpId: string;
+
@ViewChild('markdownEditor', {static: true})
markdownEditorElmRef: ElementRef;
diff --git a/ui-ngx/src/assets/help/en_US/widget/editor/widget_js_markdown_pattern.md b/ui-ngx/src/assets/help/en_US/widget/editor/widget_js_markdown_pattern.md
new file mode 100644
index 0000000000..fd4ab60a9c
--- /dev/null
+++ b/ui-ngx/src/assets/help/en_US/widget/editor/widget_js_markdown_pattern.md
@@ -0,0 +1,68 @@
+#### Markdown pattern
+
+
+
+
+The Markdown template displays the value of the first found key in the entities in the entity alias.
+
+
+
+
+#### Examples
+
+Use # to create a Markdown header. The number of characters # specifies the type of header: # - h1, ## - h2, ### - h3, etc.
+
+```markdown
+ ###### Markdown/HTML card
+{:copy-code}
+```
+ ###### Markdown/HTML card
+
+
+
+
+Use - character to create list item. You can create nested lists separating them with tabs in the pattern:
+
+ ```markdown
+ - Element 1
+ - Element 2
+ - Element 2.1
+ - Element 2.2
+ -Element 3
+{:copy-code}
+ ```
+- Element 1
+- Element 2
+ - Element 2.1
+ - Element 2.2
+- Element 3
+
+
+
+
+Use * character to choose style:
+
+ ```markdown
+ - *Element 1*
+ - **Element 2**
+ - ***Element 3***
+{:copy-code}
+ ```
+- *Element 1*
+- **Element 2**
+- ***Element 3***
+
+
+
+
+Use ${} to add some value from your key:
+ ```markdown
+ - **Element 1**: ${key1Name}
+ - **Element 1**: ${key2Name}
+ - **Element 1**: ${key3Name}
+{:copy-code}
+ ```
+ - **Element 1**: key1Value
+ - **Element 2**: key2Value
+ - **Element 3**: key3Value
+
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 2b1eb11de7..3f3f70860f 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -4276,6 +4276,7 @@
"qr-code": {
"use-qr-code-text-function": "Use QR code text function",
"qr-code-text-pattern": "QR code text pattern (for ex. '${entityName} | ${keyName} - some text.')",
+ "qr-code-text-pattern-hint": "QR code text pattern use the value of the first found key in the entities in the entity alias.",
"qr-code-text-pattern-required": "QR code text pattern is required.",
"qr-code-text-function": "QR code text function"
},