Skip to content

Draft: [ENH] embeddable content outside of Tiki

Victor Emanouilov requested to merge kroky/tiki:feature/embedded-content into master
  • [ENH] embeddable content: add ability to generate JS/HTML embeddable code for any wiki page, create auth token with same permission access rights and paste the code in another site where it will embed the contents of the wiki page

The feature requires: auth_access_tokens preference enabled. Any registered user viewing a wiki page can click More -> Get embeddable code, copy the code and paste it on any website. The page is rendered using the group permissions of the user copying the link/code.

Embedded code is whatever the parser outputs for the wiki page - thus only the HTML and internal JS/CSS output from the page. Since this is a direct embedding via AJAX on 3rd party sites, we don't mess with global styles or javascript. This means that the layout and styles that depend on the Tiki theme will probably be lost when embedding outside Tiki. It might be best to embed into a bootstrap-enabled site. However, this can be worked around by using specific styles of the embeddable content which won't be lost when embedding.

The other approach would be through an iframe. We can load the full Tiki theme and achieve 1:1 display and layout/styles.

https://avan.tech/item72901

Edited by Victor Emanouilov

Merge request reports