Skip to content

Files

Latest commit

 

History

History

collabora-aca-extension

ACA Extension Collabora

Extension for Alfresco-Content-Application to edit documents with Collabora Online. This extension add a button and open a iFrame to edit the document.

Building

Run the following script to build the library

npm run build:collabora-online-extension

Publishing

cd dist/@jeci/collabora-online-extension
npm publish --access=public

Testing with local ACA instance

Build and package the extension library locally without publishing to NPM:

npm run package:collabora-online-extension

The script produces the dist/collabora-online-extension/collabora-online-extension-<version>.tgz file that can be used to install dependency.

Switch to the ACA project and run:

npm i <path>/aca-extension-collabora/dist/@jeci/collabora-online-extension/jeci-collabora-online-extension-<version>.tgz

Update the extensions.module.ts file in the folder src/app/ and append the module:

import { CollaboraOnlineModule } from '@jeci/collabora-online-extension';

@NgModule({
  imports: [
    ...,
    CollaboraOnlineModule
  ]
})
export class AppExtensionsModule {}

Update the app.extensions.json file in the foler src/assets/ and register new plugin:

{
  "$schema": "../../extension.schema.json",
  "$name": "app",
  "$version": "1.0.0",
  "$references": [
    "collabora-online.plugin.json"
  ],
}

In angular.json file add these lines :

{
  ...
  "projects": {
    "app": {
      ...
      "architect": {
        "build": {
          ...
          "options": {
            ...
            "assets": [
              ...
              {
               "glob": "collabora-online.plugin.json",
               "input": "node_modules/@jeci/collabora-online-extension/assets",
               "output": "/assets/plugins"
              },
              {
               "glob": "**/*",
               "input": "node_modules/@jeci/collabora-online-extension/assets",
               "output": "/assets/collabora-online-extension"
              }
            ]
          }
        }
      }
    }
  }
}

Run the ACA application

npm start

Depending on the setup, you might need to log in as an administrator and enable external plugins feature for your local run.