1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-24 11:38:34 +09:00
misskey/src/client/app/common/views/components/formula.vue

27 lines
424 B
Vue
Raw Normal View History

2018-11-16 17:03:52 +09:00
<template>
<span v-html="compiledFormula"></span>
</template>
<script lang="ts">
import Vue from 'vue';
import * as katex from 'katex';
export default Vue.extend({
props: {
formula: {
type: String,
required: true
}
},
computed: {
compiledFormula(): any {
return katex.renderToString(this.formula);
}
}
});
</script>
<style>
@import "../../../../../../node_modules/katex/dist/katex.min.css";
</style>