@ember-eui/core 6.5.14 → 6.5.15
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.
|
@@ -13,6 +13,8 @@ export interface EuiMarkdownEditorToolbarArgs {
|
|
|
13
13
|
processingPluginList?: typeof defaultProcessingPlugins;
|
|
14
14
|
replaceNode?: EuiMarkdownEditorComponent['replaceNode'];
|
|
15
15
|
value: string;
|
|
16
|
+
//you can pass in a string or an array of strings to be added to the root element
|
|
17
|
+
rootClasses?: string | string[];
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMarkdownEditorToolbarArgs> {
|
|
@@ -40,12 +42,20 @@ export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMark
|
|
|
40
42
|
.use(identityCompiler);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
get rootClasses(): string[] {
|
|
46
|
+
let baseClasses = ['euiMarkdownFormat', 'euiText', 'euiText--medium'];
|
|
47
|
+
if (this.args.rootClasses) {
|
|
48
|
+
baseClasses = baseClasses.concat(this.args.rootClasses);
|
|
49
|
+
}
|
|
50
|
+
return baseClasses;
|
|
51
|
+
}
|
|
52
|
+
|
|
43
53
|
@cached
|
|
44
54
|
get result() {
|
|
45
55
|
try {
|
|
46
56
|
const processed = this.processor.processSync(this.args.value);
|
|
47
57
|
return toDOM(processed.result as RehypeNode, {
|
|
48
|
-
rootClasses:
|
|
58
|
+
rootClasses: this.rootClasses
|
|
49
59
|
});
|
|
50
60
|
//eslint-disable-next-line
|
|
51
61
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-eui/core",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.15",
|
|
4
4
|
"description": "Ember Components for Elastic UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -186,5 +186,5 @@
|
|
|
186
186
|
"volta": {
|
|
187
187
|
"extends": "../../package.json"
|
|
188
188
|
},
|
|
189
|
-
"gitHead": "
|
|
189
|
+
"gitHead": "664e1a1b0b11a4bc58603fd5302eb7a367e7db1f"
|
|
190
190
|
}
|