From ca4faaf35899ea9f234d56fc32f5e4bd2628d16e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 16 Feb 2017 14:28:05 +0100 Subject: [PATCH] only load when in the files app Fixes #37 --- appinfo/app.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index c2f86ab..289e228 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,4 +1,9 @@ getEventDispatcher(); +$eventDispatcher->addListener( + 'OCA\Files::loadAdditionalScripts', + function () { + //load the required files + OCP\Util::addscript('files_markdown', 'editor'); + OCP\Util::addStyle('files_markdown', 'preview'); + });