@hypericon/mico 0.3.7 → 0.3.9
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.
|
@@ -12,6 +12,8 @@ export declare const MarkdownEditor: m.Component<{
|
|
|
12
12
|
highlight?: boolean;
|
|
13
13
|
/** @default true */
|
|
14
14
|
enableShortcuts?: boolean;
|
|
15
|
+
/** Function called on licking the help button. The button is hidden if the function is undefined. */
|
|
16
|
+
onHelp?: () => any;
|
|
15
17
|
class?: string;
|
|
16
18
|
style?: string;
|
|
17
19
|
}, {
|
|
@@ -133,10 +133,15 @@ exports.MarkdownEditor = {
|
|
|
133
133
|
onclick: () => this.state.applyLink(),
|
|
134
134
|
}, (0, mithril_1.default)(Icon_1.Icon, { fas: "link" })),
|
|
135
135
|
]),
|
|
136
|
+
attrs.onHelp !== undefined ? (0, mithril_1.default)(".editor-button-group", [
|
|
137
|
+
(0, mithril_1.default)("button", {
|
|
138
|
+
onclick: () => { var _a; return (_a = attrs.onHelp) === null || _a === void 0 ? void 0 : _a.call(attrs); },
|
|
139
|
+
}, (0, mithril_1.default)(Icon_1.Icon, { far: "circle-question" })),
|
|
140
|
+
]) : [],
|
|
136
141
|
]),
|
|
137
142
|
// Editor content
|
|
138
143
|
(0, mithril_1.default)("textarea.editor-textarea", {
|
|
139
|
-
rows: this.state.editorValue.split("\n").length +
|
|
144
|
+
rows: this.state.editorValue.split("\n").length + 1,
|
|
140
145
|
value: this.state.editorValue,
|
|
141
146
|
oninput: (e) => {
|
|
142
147
|
this.state.editorValue = e.target.value;
|