Added filters
This commit is contained in:
		| @@ -3,7 +3,6 @@ import InsertTemplateComponent from '@components/common/InsertTemplateComponent. | ||||
| import XMLButtonFormatterComponent from '@components/formatter/XMLButtonFormatterComponent.vue' | ||||
| import { ref } from 'vue'; | ||||
| import CodeEditor from '../CodeEditorComponent.vue'; | ||||
| import { Buffer } from 'buffer'; | ||||
|  | ||||
| const data = ref('') | ||||
|  | ||||
| @@ -45,9 +44,8 @@ function readFile(file : any) { | ||||
|     const reader = new FileReader() | ||||
|     reader.onloadend = () => { | ||||
|         var result = reader.result?.toString(); | ||||
|         if (typeof result == "string") { | ||||
|         if (typeof result == "string") | ||||
|             sendNewValue(result); | ||||
|         } | ||||
|              | ||||
|     } | ||||
|     reader.readAsText(file.target.files[0]) | ||||
| @@ -60,7 +58,7 @@ function readFile(file : any) { | ||||
|         <div class="flex place-content-between w-full items-center"> | ||||
|             <span class="dark:text-white mr-2">{{ stylizedName }}</span> | ||||
|             <div class="flex space-x-2 pb-2"> | ||||
|                 <input id="fileLoader" ref="inputFile" class="file-selector w-4" type="file" @change="readFile" /> | ||||
|                 <input id="fileLoader" ref="inputFile" class="file-selector" type="file" accept=".xml,.xql,.xquery,.xslt,text/xml,text/plain" @change="readFile" /> | ||||
|                 <InsertTemplateComponent :stylized-name="props.stylizedName" @update:default-data="(data: string) => updateData(data)"></InsertTemplateComponent> | ||||
|                 <XMLButtonFormatterComponent v-if="canBeFormatted()" :xml="data" @update:result="(data:any) => updateData(data.result)"></XMLButtonFormatterComponent> | ||||
|                 <button class="tool-button" @click="clear">Clear</button> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user