Tab UI content extension using KCenter methods

The following sample demonstrates how to access KCenter API methods from an external application with JavaScript.

Step 1 - create a sample HTML file

Create the following sample HTML file and copy it to the webapps/openkm folder with the name test.html

<html>
  <head>
    <script type="text/javascript" src="kcenter/api/common.js"></script>
    <script type="text/javascript" src="kcenter/api/browser.js"></script>
  </head>
  <body>
    <h1>Quick sample about how do request to exposed KCenter API</h1>

    <button onclick="_refreshUI()">
      Refresh the UI in the browser view
    </button>
  </body>
</html>

Step 2 - Configure the external tab document extension

More information about the extension at the External tab document extension 

More information about enabling extensions at Enable extensions ( remember to enable the extension in the profile and refresh the KCenter UI ).

  • Configure extra tab document extension with the following values:
Field / PropertyTypeDescription

extension.external.tab.document

List

Integration;/openkm/test.html

  • Select a document from the browser view.
  • Click on the Integration tab.
  • Click on " the Refresh the UI in the browser view" button. The KCenter UI will be refreshed.