How can I add the justify button to the H5P text editor?

 

Hello I work on a Moodle platform with H5P, but I want to implement the justify button in the text editor and change the font type to "Avenir", How can I do it? Thank you!

BV52's picture

Hi Josh01,

The easiest way to do this is to use a PHP hook, to add your own content type to your CSS-file. Please see the documentation here.

-BV52

Thank you!

I have not yet been able to solve the problem at 100%, add the button justify using "justifyBlock" in the file h5peditor-html.js, but at the moment of saving the content does not. Which css files should be edited or how can I solve this problem in the justification and in the font type? I want to change the font type of H5P by Avenir.

tomaj's picture

Hi,

To add a button to the editor, this documentation is probably better to follow. It just changes the semantics file, and doesn't require maintainence trough upgrades.

Do you want to change the fon't used "frontend" in all H5Ps? Then you just add some css selector on a high level, and do what BV52 suggested.

- Tom