Browse Source

feat: add language info in the code editor

Ahmad Kholid 3 years ago
parent
commit
53f76edbf1
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/components/newtab/shared/SharedCodemirror.vue

+ 7 - 1
src/components/newtab/shared/SharedCodemirror.vue

@@ -3,7 +3,13 @@
     ref="containerEl"
     :class="{ 'hide-gutters': !lineNumbers }"
     class="codemirror relative overflow-auto rounded-lg"
-  ></div>
+  >
+    <span
+      class="text-sm text-gray-300 absolute bottom-2 right-2 z-10 pointer-events-none z-10"
+    >
+      {{ lang }}
+    </span>
+  </div>
 </template>
 <script setup>
 import { onMounted, ref, onBeforeUnmount, watch } from 'vue';