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> | </script> | ||||||
|  |  | ||||||
| <template> | <template> | ||||||
|     <button class="tool-button" @click="process()">Format XML</button> |     <button class="tool-button" @click="process()">Format</button> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <style scoped></style> | <style scoped></style> | ||||||
|   | |||||||
| @@ -26,8 +26,10 @@ function clear() { | |||||||
|     updateData(''); |     updateData(''); | ||||||
| } | } | ||||||
|  |  | ||||||
| function isXMLField() { | function canBeFormatted() { | ||||||
|     return props.prettyName.toLowerCase() == 'xml'; |     return props.prettyName.toLowerCase() == 'xml' ||  | ||||||
|  |            props.prettyName.toLowerCase() == 'xsd' ||  | ||||||
|  |            props.prettyName.toLowerCase() == 'xslt'; | ||||||
| } | } | ||||||
|  |  | ||||||
| </script> | </script> | ||||||
| @@ -38,7 +40,7 @@ function isXMLField() { | |||||||
|             <span class="dark:text-white">{{ prettyName }}</span> |             <span class="dark:text-white">{{ prettyName }}</span> | ||||||
|             <div class="flex space-x-2"> |             <div class="flex space-x-2"> | ||||||
|                 <InsertTemplateComponent :pretty-name="props.prettyName" @update:default-data="(data: string) => updateData(data)"></InsertTemplateComponent> |                 <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> |                 <button class="tool-button" @click="clear">Clear</button> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user