Implemented XML Formatter and simplified structure of XML tools #229
@@ -40,5 +40,5 @@ function setDefault() {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
    <button class="tool-button" @click="setDefault()">Insert default {{ prettyName }}</button>
 | 
			
		||||
    <button class="tool-button" @click="setDefault()">Default {{ prettyName }}</button>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="flex h-full"></div>
 | 
			
		||||
 | 
			
		||||
    <textarea name="data" id="data" class="text-field"></textarea>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
@@ -14,6 +14,10 @@ function format(formattedXml: any) {
 | 
			
		||||
    xml.value = formattedXml.result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function clear() {
 | 
			
		||||
    xml.value = '';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
@@ -22,6 +26,7 @@ function format(formattedXml: any) {
 | 
			
		||||
            <span class="dark:text-slate-100">XML Formatter</span>
 | 
			
		||||
            <div class="space-x-2">
 | 
			
		||||
                <InsertTemplateComponent pretty-name="XML" @update:defaultData="(data: string) => setTextFieldValue(data)"></InsertTemplateComponent>
 | 
			
		||||
                <button class="tool-button" @click="clear()">Clear</button>
 | 
			
		||||
                <XMLButtonFormatterComponent :xml="xml" @update:result="(data: any) => format(data)"></XMLButtonFormatterComponent>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user