0
votes

I have a document library and i have formatted the list view. This works great, however, we lose the OOTB functionality of SharePoint online where you can "preview" the file. This is where it opens in the main window and you can see the file but you also have all the SPO functionality, Share, Move, Copy, information window, version history etc.

How do i edit my Json to link to the OOTB preview? Does anyone have examples of this?

1
How did you formatted the view? Using column formatting in the new experience? What do you mean with “preview”? Can you share some screenshot and the JSON? - Lukas Nespor
Modern SharePoint experience formatted with json. Within a modern SPO doc lib you can preview pdf's, images etc, it's standard functionality. - novak73

1 Answers

0
votes

I was looking at it, but it seems that it is not possible to get items url nor parent folder's url using column formatting. I have found somehting at GitHub that mentioned .spItemUrl, but I wasn't able to use it.

The only way, is to create Field Customizer using Javascript, which will give you much broader options. Unfortunately it is not that easy to build as creating column formatting using JSON.

Reference:

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer