josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
818 stars 108 forks source link

Hide "table" mode #272

Closed jbek7 closed 1 year ago

jbek7 commented 1 year ago

I don't see an option to configure hiding modes in documentation or at least hiding "table" mode. Is there a way to configure it?

jbek7 commented 1 year ago

Never mind I see I can use:

onRenderMenu: (items, context)=>{
                    return items.filter(v => v.text !== "table" && v.type === "button");
                }
josdejong commented 1 year ago

👍

please note that hiding the menu button does not fully disable table mode, it can for example pop up when you select an array, right click the array, and then choose "Edit Array" from the context menu.