|
|
@ -187,6 +187,24 @@ export class MarkdownTextArea extends Component<
|
|
|
|
<use xlinkHref="#icon-italic"></use>
|
|
|
|
<use xlinkHref="#icon-italic"></use>
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
|
|
|
class="btn btn-sm text-muted"
|
|
|
|
|
|
|
|
data-tippy-content={i18n.t('subscript')}
|
|
|
|
|
|
|
|
onClick={linkEvent(this, this.handleInsertSubscript)}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<svg class="icon icon-inline">
|
|
|
|
|
|
|
|
<use xlinkHref="#icon-subscript"></use>
|
|
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
|
|
|
class="btn btn-sm text-muted"
|
|
|
|
|
|
|
|
data-tippy-content={i18n.t('superscript')}
|
|
|
|
|
|
|
|
onClick={linkEvent(this, this.handleInsertSuperscript)}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<svg class="icon icon-inline">
|
|
|
|
|
|
|
|
<use xlinkHref="#icon-superscript"></use>
|
|
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
<button
|
|
|
|
class="btn btn-sm text-muted"
|
|
|
|
class="btn btn-sm text-muted"
|
|
|
|
data-tippy-content={i18n.t('link')}
|
|
|
|
data-tippy-content={i18n.t('link')}
|
|
|
@ -469,6 +487,16 @@ export class MarkdownTextArea extends Component<
|
|
|
|
i.simpleInsert('#');
|
|
|
|
i.simpleInsert('#');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleInsertSubscript(i: MarkdownTextArea, event: any) {
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
i.simpleSurround('~');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleInsertSuperscript(i: MarkdownTextArea, event: any) {
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
i.simpleSurround('^');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
simpleInsert(chars: string) {
|
|
|
|
simpleInsert(chars: string) {
|
|
|
|
if (!this.state.content) {
|
|
|
|
if (!this.state.content) {
|
|
|
|
this.state.content = `${chars} `;
|
|
|
|
this.state.content = `${chars} `;
|
|
|
|