@record-evolution/widget-markdown 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent widget-markdown following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "widget-markdown",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/widget-markdown.js",
|
|
9
9
|
"types": "dist/src/widget-markdown.d.ts",
|
|
@@ -5,23 +5,10 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type FontSize = string;
|
|
9
|
-
export type FontWeight = number;
|
|
10
|
-
|
|
11
8
|
export interface TextboxConfiguration {
|
|
12
9
|
markdown?: Markdown;
|
|
13
|
-
fontSize?: FontSize;
|
|
14
|
-
fontWeight?: FontWeight;
|
|
15
|
-
color?: FontColor;
|
|
16
|
-
backgroundColor?: BackgroundColor;
|
|
17
10
|
[k: string]: unknown;
|
|
18
11
|
}
|
|
19
12
|
export interface Markdown {
|
|
20
13
|
[k: string]: unknown;
|
|
21
14
|
}
|
|
22
|
-
export interface FontColor {
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
}
|
|
25
|
-
export interface BackgroundColor {
|
|
26
|
-
[k: string]: unknown;
|
|
27
|
-
}
|
|
@@ -6,30 +6,6 @@
|
|
|
6
6
|
"title": "Markdown",
|
|
7
7
|
"order": 1,
|
|
8
8
|
"type": "textarea"
|
|
9
|
-
},
|
|
10
|
-
"fontSize": {
|
|
11
|
-
"title": "Font Size",
|
|
12
|
-
"order": 2,
|
|
13
|
-
"dataDrivenDisabled": true,
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"fontWeight": {
|
|
17
|
-
"title": "Font Weight",
|
|
18
|
-
"order": 3,
|
|
19
|
-
"dataDrivenDisabled": true,
|
|
20
|
-
"type": "number"
|
|
21
|
-
},
|
|
22
|
-
"color": {
|
|
23
|
-
"title": "Font Color",
|
|
24
|
-
"order": 4,
|
|
25
|
-
"type": "color",
|
|
26
|
-
"color": true
|
|
27
|
-
},
|
|
28
|
-
"backgroundColor": {
|
|
29
|
-
"title": "Background Color",
|
|
30
|
-
"order": 5,
|
|
31
|
-
"type": "color",
|
|
32
|
-
"color": true
|
|
33
9
|
}
|
|
34
10
|
}
|
|
35
11
|
}
|
package/src/widget-markdown.ts
CHANGED
|
@@ -114,6 +114,8 @@ export class WidgetMarkdown extends LitElement {
|
|
|
114
114
|
display: flex;
|
|
115
115
|
flex-direction: column;
|
|
116
116
|
width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
overflow: auto;
|
|
117
119
|
padding: 12px;
|
|
118
120
|
box-sizing: border-box;
|
|
119
121
|
}
|
|
@@ -148,13 +150,7 @@ export class WidgetMarkdown extends LitElement {
|
|
|
148
150
|
const mdHtml: string = this.marked.parse(mdText) as string
|
|
149
151
|
return html`
|
|
150
152
|
<div class="wrapper" style="background-color: ${this.themeBgColor}">
|
|
151
|
-
<div
|
|
152
|
-
class="paging markdown-body"
|
|
153
|
-
?active=${this.inputData?.markdown}
|
|
154
|
-
style="font-size: ${this.inputData?.fontSize};
|
|
155
|
-
font-weight: ${this.inputData?.fontWeight};
|
|
156
|
-
color: ${this.inputData?.color || this.themeTitleColor};"
|
|
157
|
-
>
|
|
153
|
+
<div class="paging markdown-body" ?active=${this.inputData?.markdown}>
|
|
158
154
|
${unsafeHTML(mdHtml)}
|
|
159
155
|
</div>
|
|
160
156
|
</div>
|