Using Viper Editor in an Asset Builder


(gja) #1

**Matrix Version:**5.4.51

Hi,

Is there any documentation to assist in getting up and running with using viper in an asset builder?

I’ve downloaded the files from https://github.com/squizlabs/Viper but am having trouble getting it to work.

I’m getting lots of errors about missing css files, but they aren’t in the repo so that can’t be the problem.

Thanks Georgina.


(Chiranjivi Upreti) #2

Viper is bundled with Edit+. You will need to get the correct version of Edit+ tarball matching your Matrix version, and then extract it into data/public dir as per Edit+ installation guide: https://matrix.squiz.net/resources/installation-guides/edit-plus-installation-guide

Once the Edit+ and Viper file are available in data/public/ees dir, you can update the WYSIWYG Content Type Preference in Global Preferences to use Edit+ editor for Matrix admin mode.

Note that this is a system wide setting and will apply to all the places using WYSIWYG Content Type not just for Asset Builder’s bodycopy.


(gja) #3

This isn’t what I want to do.

We already have edit+ installed and are using it both for _edit and _admin.

I want to use viper as the editor in asset builder on a wysiwyg metadata field.

I want to setup viper as per the MultiViper example on https://github.com/squizlabs/Viper.


(Chiranjivi Upreti) #4

Ah gotcha! Unfortunately Viper is not supported there (along with couple few of places):
https://squizmap.squiz.net/matrix/9295

Is there any documentation to assist in getting up and running with using viper in an asset builder?

This is something that will need to be supported in the Matrix natively. The Viper files are already there in your Matrix instance, its just that currently they don’t work in frontend output due some of lib files required for Viper does not gets loaded in the frontend by Matrix.


(gja) #5

I have seen it work elsewhere, on WYSIWYG fields in an asset builder.

The existing out of the box solution is clunky and really isn’t user-friendly at all.


(Nick Papadatos) #6

Agreed, I’m currently trying to build a central news hub so we can push stories across different areas of our website but am disappointed with the WYSIWIG editor within an asset builder as well. Apparently Viper can be embedded (you’ll have to get squiz to do it for you and depends on what version of Matrix you’e on) but me thinks we’re being forced to use Edit+?


(gja) #7

I don’t see why we should have to get squiz to do it for us, every time we want to create a new asset builder.


(Bart Banda) #8

You should be able to get it working by using the standalone version of Viper if you are downloading and using it from GitHub, or you can just link to the same CSS and JS files that are used in Edit+.

Have a look at the example implementation in that GitHub repo as well for how to run it standalone: https://github.com/squizlabs/Viper/tree/master/Examples/Modern

To use it on an Asset Builder that is already using the classic WYSIWYG, you might have to do some trickery where you manually output the hidden field that normally would get printed using a keyword, and then initiate Viper manually against it.

We are planning on making this easier once we deprecate the classic WYSIWYG and bring Viper into core for Matrix which is scheduled for later this year, but you should be able to work around it with some manual minor frontend dev.

Let me know how you go.


(Michael Wilson) #9

Did you get this working @georgina?

I don’t understand why we are seeing the classic editor when we are paying for Edit+ and have it installed and working.


(Dkevey) #10

Hi Bart, is there an update please on when Viper might be available by default on WYSIWYG areas on an Asset Builder page? It kinda works in the Edit Form layout, but when activated is fixed to the top of the screen rather than positioned to the WYSIWYG area. Would be handy for a number of projects we have lined up rather than having to train Edit+ users for manage only a few pages in the CMS. Thanks.


(Brad Ingram) #11

Hi dkevey,

This idea in the Squizmap was updated 3 days ago by Bart, it looks like they’re aiming to have this in Version 6.

https://squizmap.squiz.net/matrix/9295

We’re in the same boat, pretty keen for this functionality to be default.

Cheers.


(Bart Banda) #12

Hey guys, yes, this will be available in Matrix 6. Here is a quick screenshot of how it looks on a typical asset builder that builds news items:


(Dkevey) #13

Awesome, thanks Brad and Bart


(Douglas (@finnatic at @waikato)) #14

Is there any chance of backporting it to Squiz 5.5.6?


(Bart Banda) #15

Sorry, unfortunately this won’t make it in to 5.5.6 as there was quite a bit of work getting it to work and Matrix 5.5 is now in support mode only.


(Tbaatar) #16

Hi Bart,

Any news on the release of Matrix V6 core code release to public?

Sorry for being impatient.

Thanks.


(Douglas (@finnatic at @waikato)) #17

Ok. We may continue efforts to restore some Viper functionality that was added in a past development by Squiz in our 5.5.6 or move the WYSIWYG editing of that content to the post creation stage with our asset builder process.