XSD and SXLT can now also be formatted in respective tools
This commit is contained in:
		| @@ -48,7 +48,7 @@ function sendProcessedData(data: JSON) { | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|     <button class="tool-button" @click="process()">Format XML</button> | ||||
|     <button class="tool-button" @click="process()">Format</button> | ||||
| </template> | ||||
|  | ||||
| <style scoped></style> | ||||
|   | ||||
| @@ -26,8 +26,10 @@ function clear() { | ||||
|     updateData(''); | ||||
| } | ||||
|  | ||||
| function isXMLField() { | ||||
|     return props.prettyName.toLowerCase() == 'xml'; | ||||
| function canBeFormatted() { | ||||
|     return props.prettyName.toLowerCase() == 'xml' ||  | ||||
|            props.prettyName.toLowerCase() == 'xsd' ||  | ||||
|            props.prettyName.toLowerCase() == 'xslt'; | ||||
| } | ||||
|  | ||||
| </script> | ||||
| @@ -38,7 +40,7 @@ function isXMLField() { | ||||
|             <span class="dark:text-white">{{ prettyName }}</span> | ||||
|             <div class="flex space-x-2"> | ||||
|                 <InsertTemplateComponent :pretty-name="props.prettyName" @update:default-data="(data: string) => updateData(data)"></InsertTemplateComponent> | ||||
|                 <XMLButtonFormatterComponent v-if="isXMLField()" :xml="data" @update:result="(data:any) => updateData(data.result)"></XMLButtonFormatterComponent> | ||||
|                 <XMLButtonFormatterComponent v-if="canBeFormatted()" :xml="data" @update:result="(data:any) => updateData(data.result)"></XMLButtonFormatterComponent> | ||||
|                 <button class="tool-button" @click="clear">Clear</button> | ||||
|             </div> | ||||
|         </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user