Added vitepress for documentation. (#6270)
68
.github/workflows/build-and-deploy-docs.yml
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Workflow for deploying static content to GitHub Pages
|
||||
name: Deploy Docs to GitHub Pages
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["develop"]
|
||||
paths:
|
||||
- doc/** # Only run workflow when changes are made to the doc directory
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
packages: read
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Single deploy job since we're just deploying
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
- name: Only install direct dependencies
|
||||
run: pnpm config set auto-install-peers false
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build app
|
||||
working-directory: doc
|
||||
run: pnpm run docs:build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: './doc/.vitepress/dist'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
2
doc/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.vitepress/cache
|
||||
dist
|
74
doc/.vitepress/config.mts
Normal file
|
@ -0,0 +1,74 @@
|
|||
import { defineConfig } from 'vitepress'
|
||||
import {version} from '../../package.json'
|
||||
// https://vitepress.dev/reference/site-config
|
||||
const commitRef = process.env.COMMIT_REF?.slice(0, 8) || 'dev'
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
title: "Etherpad Documentation",
|
||||
description: "Next Generation Collaborative Document Editing",
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
nav: [
|
||||
{ text: 'Home', link: '/' },
|
||||
{ text: 'Getting started', link: '/docker.md' }
|
||||
],
|
||||
logo:'/favicon.ico',
|
||||
|
||||
sidebar: {
|
||||
'/': [
|
||||
{
|
||||
link: '/',
|
||||
text: 'About',
|
||||
items: [
|
||||
{ text: 'Docker', link: '/docker.md' },
|
||||
{ text: 'Localization', link: '/localization.md' },
|
||||
{ text: 'Cookies', link: '/cookies.md' },
|
||||
{ text: 'Plugins', link: '/plugins.md' },
|
||||
{ text: 'Stats', link: '/stats.md' },
|
||||
{text: 'Skins', link: '/skins.md' },
|
||||
{text: 'Demo', link: '/demo.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'API',
|
||||
link: '/api/',
|
||||
items: [
|
||||
{ text: 'Changeset', link: '/api/changeset_library.md' },
|
||||
{text: 'Editbar', link: '/api/editbar.md' },
|
||||
{text: 'EditorInfo', link: '/api/editorInfo.md' },
|
||||
{text: 'Embed Parameters', link: '/api/embed_parameters.md' },
|
||||
{text: 'Hooks Client Side', link: '/api/hooks_client-side.md' },
|
||||
{text: 'Hooks Server Side', link: '/api/hooks_server-side.md' },
|
||||
{text: 'Plugins', link: '/api/pluginfw.md' },
|
||||
{text: 'Toolbar', link: '/api/toolbar.md' },
|
||||
{text: 'HTTP API', link: '/api/http_api.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Old Docs',
|
||||
items: [
|
||||
{ text: 'Easysync description', link: '/easysync/easysync-full-description.pdf' },
|
||||
{ text: 'Easysync notes', link: '/easysync/easysync-notes.pdf' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/stats': [
|
||||
{
|
||||
text: 'Stats',
|
||||
items:[
|
||||
{ text: 'Stats', link: '/stats/' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
footer: {
|
||||
message: `Published under Apache License`,
|
||||
copyright: `(${commitRef}) v${version} by Etherpad Foundation`
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/ether/etherpad-lite' }
|
||||
]
|
||||
}
|
||||
})
|
22
doc/.vitepress/theme/components/SvgImage.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
defineProps<{ svg: string }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<figure class="svg-image-root" v-html="svg" />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.svg-image-root {
|
||||
background-color: #eee;
|
||||
border-radius: 8px;
|
||||
padding: 1ch;
|
||||
margin: 1ch 0;
|
||||
}
|
||||
html.dark .svg-image-root {
|
||||
background-color: #313641;
|
||||
}
|
||||
.svg-image-root svg text {
|
||||
font-family: var(--vp-font-family-base);
|
||||
}
|
||||
</style>
|
12
doc/.vitepress/theme/index.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { h } from 'vue'
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import './styles/vars.css'
|
||||
import SvgImage from './components/SvgImage.vue'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
enhanceApp({ app }) {
|
||||
app.component('SvgImage', SvgImage)
|
||||
},
|
||||
} satisfies Theme
|
77
doc/.vitepress/theme/styles/vars.css
Normal file
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-c-brand: #646cff;
|
||||
--vp-c-brand-light: #747bff;
|
||||
--vp-c-brand-lighter: #9499ff;
|
||||
--vp-c-brand-lightest: #bcc0ff;
|
||||
--vp-c-brand-dark: #535bf2;
|
||||
--vp-c-brand-darker: #454ce1;
|
||||
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-button-brand-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-text: var(--vp-c-white);
|
||||
--vp-button-brand-bg: var(--vp-c-brand);
|
||||
--vp-button-brand-hover-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-hover-text: var(--vp-c-white);
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
|
||||
--vp-button-brand-active-border: var(--vp-c-brand-light);
|
||||
--vp-button-brand-active-text: var(--vp-c-white);
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Home
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-home-hero-name-color: transparent;
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(
|
||||
120deg,
|
||||
#0f775b 30%,
|
||||
#0f775b
|
||||
);
|
||||
|
||||
--vp-home-hero-image-background-image: linear-gradient(
|
||||
-45deg,
|
||||
#0f775b 50%,
|
||||
#0f775b 50%
|
||||
);
|
||||
--vp-home-hero-image-filter: blur(40px);
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(72px);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Custom Block
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-custom-block-tip-border: var(--vp-c-brand);
|
||||
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--vp-custom-block-tip-border: var(--vp-c-brand);
|
||||
--vp-custom-block-tip-text: var(--vp-c-brand-lightest);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
|
||||
}
|
44
doc/api/changeset_library.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Changeset Library
|
||||
|
||||
The [changeset
|
||||
library](https://github.com/ether/etherpad-lite/blob/develop/src/static/js/Changeset.js)
|
||||
provides tools to create, read, and apply changesets.
|
||||
|
||||
## Changeset
|
||||
|
||||
```javascript
|
||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
```
|
||||
|
||||
A changeset describes the difference between two revisions of a document. When a
|
||||
user edits a pad, the browser generates and sends a changeset to the server,
|
||||
which relays it to the other users and saves a copy (so that every past revision
|
||||
is accessible).
|
||||
|
||||
A transmitted changeset looks like this:
|
||||
|
||||
```
|
||||
'Z:z>1|2=m=b*0|1+1$\n'
|
||||
```
|
||||
|
||||
## Attribute Pool
|
||||
|
||||
```javascript
|
||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
||||
```
|
||||
|
||||
Changesets do not include any attribute key–value pairs. Instead, they use
|
||||
numeric identifiers that reference attributes kept in an [attribute
|
||||
pool](https://github.com/ether/etherpad-lite/blob/develop/src/static/js/AttributePool.js).
|
||||
This attribute interning reduces the transmission overhead of attributes that
|
||||
are used many times.
|
||||
|
||||
There is one attribute pool per pad, and it includes every current and
|
||||
historical attribute used in the pad.
|
||||
|
||||
## Further Reading
|
||||
|
||||
Detailed information about the changesets & Easysync protocol:
|
||||
|
||||
* [Easysync Protocol](https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-notes.pdf)
|
||||
* [Etherpad and EasySync Technical Manual](https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-full-description.pdf)
|
28
doc/api/editbar.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Editbar
|
||||
src/static/js/pad_editbar.js
|
||||
|
||||
## isEnabled()
|
||||
|
||||
## disable()
|
||||
|
||||
## toggleDropDown(dropdown)
|
||||
Shows the dropdown `div.popup` whose `id` equals `dropdown`.
|
||||
|
||||
## registerCommand(cmd, callback)
|
||||
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed.
|
||||
|
||||
## registerAceCommand(cmd, callback)
|
||||
Creates an ace callstack and calls the callback with an ace instance (and a toolbar item, if applicable): `callback(cmd, ace, item)`.
|
||||
|
||||
Example:
|
||||
```
|
||||
toolbar.registerAceCommand("insertorderedlist", function (cmd, ace) {
|
||||
ace.ace_doInsertOrderedList();
|
||||
});
|
||||
```
|
||||
|
||||
## registerDropdownCommand(cmd, dropdown)
|
||||
Ties a `div.popup` where `id` equals `dropdown` to a `command` fired by clicking a button.
|
||||
|
||||
## triggerCommand(cmd[, item])
|
||||
Triggers a command (optionally with some internal representation of the toolbar item that triggered it).
|
79
doc/api/editorInfo.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
# editorInfo
|
||||
|
||||
## editorInfo.ace_replaceRange(start, end, text)
|
||||
This function replaces a range (from `start` to `end`) with `text`.
|
||||
|
||||
## editorInfo.ace_getRep()
|
||||
Returns the `rep` object.
|
||||
|
||||
## editorInfo.ace_getAuthor()
|
||||
## editorInfo.ace_inCallStack()
|
||||
## editorInfo.ace_inCallStackIfNecessary(?)
|
||||
## editorInfo.ace_focus(?)
|
||||
## editorInfo.ace_importText(?)
|
||||
## editorInfo.ace_importAText(?)
|
||||
## editorInfo.ace_exportText(?)
|
||||
## editorInfo.ace_editorChangedSize(?)
|
||||
## editorInfo.ace_setOnKeyPress(?)
|
||||
## editorInfo.ace_setOnKeyDown(?)
|
||||
## editorInfo.ace_setNotifyDirty(?)
|
||||
## editorInfo.ace_dispose(?)
|
||||
## editorInfo.ace_setEditable(bool)
|
||||
## editorInfo.ace_execCommand(?)
|
||||
## editorInfo.ace_callWithAce(fn, callStack, normalize)
|
||||
## editorInfo.ace_setProperty(key, value)
|
||||
## editorInfo.ace_setBaseText(txt)
|
||||
## editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)
|
||||
## editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)
|
||||
## editorInfo.ace_prepareUserChangeset()
|
||||
## editorInfo.ace_applyPreparedChangesetToBase()
|
||||
## editorInfo.ace_setUserChangeNotificationCallback(f)
|
||||
## editorInfo.ace_setAuthorInfo(author, info)
|
||||
## editorInfo.ace_fastIncorp(?)
|
||||
## editorInfo.ace_isCaret(?)
|
||||
## editorInfo.ace_getLineAndCharForPoint(?)
|
||||
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
|
||||
## editorInfo.ace_setAttributeOnSelection(attribute, enabled)
|
||||
Sets an attribute on current range.
|
||||
Example: `call.editorInfo.ace_setAttributeOnSelection("turkey::balls", true); // turkey is the attribute here, balls is the value
|
||||
Notes: to remove the attribute pass enabled as false
|
||||
## editorInfo.ace_toggleAttributeOnSelection(?)
|
||||
## editorInfo.ace_getAttributeOnSelection(attribute, prevChar)
|
||||
Returns a boolean if an attribute exists on a selected range.
|
||||
prevChar value should be true if you want to get the previous Character attribute instead of the current selection for example
|
||||
if the caret is at position 0,1 (after first character) it's probable you want the attributes on the character at 0,0
|
||||
The attribute should be the string name of the attribute applied to the selection IE subscript
|
||||
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
|
||||
Example `var isItThere = documentAttributeManager.getAttributeOnSelection("turkey::balls", true);`
|
||||
|
||||
See the ep_subscript plugin for an example of this function in action.
|
||||
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
|
||||
## editorInfo.ace_performSelectionChange(?)
|
||||
## editorInfo.ace_doIndentOutdent(?)
|
||||
## editorInfo.ace_doUndoRedo(?)
|
||||
## editorInfo.ace_doInsertUnorderedList(?)
|
||||
## editorInfo.ace_doInsertOrderedList(?)
|
||||
## editorInfo.ace_performDocumentApplyAttributesToRange()
|
||||
|
||||
## editorInfo.ace_getAuthorInfos()
|
||||
Returns an info object about the author. Object key = author_id and info includes author's bg color value.
|
||||
Use to define your own authorship.
|
||||
## editorInfo.ace_performDocumentReplaceRange(start, end, newText)
|
||||
This function replaces a range (from [x1,y1] to [x2,y2]) with `newText`.
|
||||
## editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)
|
||||
This function replaces a range (from y1 to y2) with `newText`.
|
||||
## editorInfo.ace_renumberList(lineNum)
|
||||
If you delete a line, calling this method will fix the line numbering.
|
||||
## editorInfo.ace_doReturnKey()
|
||||
Forces a return key at the current caret position.
|
||||
## editorInfo.ace_isBlockElement(element)
|
||||
Returns true if your passed element is registered as a block element
|
||||
## editorInfo.ace_getLineListType(lineNum)
|
||||
Returns the line's html list type.
|
||||
## editorInfo.ace_caretLine()
|
||||
Returns X position of the caret.
|
||||
## editorInfo.ace_caretColumn()
|
||||
Returns Y position of the caret.
|
||||
## editorInfo.ace_caretDocChar()
|
||||
Returns the Y offset starting from [x=0,y=0]
|
||||
## editorInfo.ace_isWordChar(?)
|
75
doc/api/embed_parameters.md
Normal file
|
@ -0,0 +1,75 @@
|
|||
# Embed parameters
|
||||
You can easily embed your etherpad-lite into any webpage by using iframes. You can configure the embedded pad using embed parameters.
|
||||
|
||||
Example:
|
||||
|
||||
Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers and will auto-focus on Line 4.
|
||||
|
||||
```
|
||||
<iframe src='http://pad.test.de/p/PAD_NAME#L4?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
|
||||
```
|
||||
|
||||
## showLineNumbers
|
||||
* Boolean
|
||||
|
||||
Default: true
|
||||
|
||||
## showControls
|
||||
* Boolean
|
||||
|
||||
Default: true
|
||||
|
||||
## showChat
|
||||
* Boolean
|
||||
|
||||
Default: true
|
||||
|
||||
## useMonospaceFont
|
||||
* Boolean
|
||||
|
||||
Default: false
|
||||
|
||||
## userName
|
||||
* String
|
||||
|
||||
Default: "unnamed"
|
||||
|
||||
Example: `userName=Etherpad%20User`
|
||||
|
||||
## userColor
|
||||
* String (css hex color value)
|
||||
|
||||
Default: randomly chosen by pad server
|
||||
|
||||
Example: `userColor=%23ff9900`
|
||||
|
||||
## noColors
|
||||
* Boolean
|
||||
|
||||
Default: false
|
||||
|
||||
## alwaysShowChat
|
||||
* Boolean
|
||||
|
||||
Default: false
|
||||
|
||||
## lang
|
||||
* String
|
||||
|
||||
Default: en
|
||||
|
||||
Example: `lang=ar` (translates the interface into Arabic)
|
||||
|
||||
## rtl
|
||||
* Boolean
|
||||
|
||||
Default: true
|
||||
Displays pad text from right to left.
|
||||
|
||||
## #L
|
||||
* Int
|
||||
|
||||
Default: 0
|
||||
Focuses pad at specific line number and places caret at beginning of this line
|
||||
Special note: Is not a URL parameter but instead of a Hash value
|
||||
|
|
@ -4,7 +4,7 @@ Most of these hooks are called during or in order to set up the formatting
|
|||
process.
|
||||
|
||||
=== documentReady
|
||||
Called from: src/templates/pad.html
|
||||
Called from: `src/templates/pad.html`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -14,7 +14,7 @@ This hook proxies the functionality of jQuery's `$(document).ready` event.
|
|||
|
||||
=== aceDomLinePreProcessLineAttributes
|
||||
|
||||
Called from: src/static/js/domline.js
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -36,7 +36,7 @@ more.
|
|||
|
||||
=== aceDomLineProcessLineAttributes
|
||||
|
||||
Called from: src/static/js/domline.js
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -58,7 +58,7 @@ more.
|
|||
|
||||
=== aceCreateDomLine
|
||||
|
||||
Called from: src/static/js/domline.js
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -78,7 +78,7 @@ question, and cls will be the new class of the element going forward.
|
|||
|
||||
=== acePostWriteDomLineHTML
|
||||
|
||||
Called from: src/static/js/domline.js
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -89,7 +89,7 @@ page.
|
|||
|
||||
=== aceAttribsToClasses
|
||||
|
||||
Called from: src/static/js/linestylefilter.js
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -107,7 +107,7 @@ be parsed into a valid class string.
|
|||
|
||||
=== aceAttribClasses
|
||||
|
||||
Called from: src/static/js/linestylefilter.js
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
1. Attributes - Object of Attributes
|
||||
|
@ -127,7 +127,7 @@ exports.aceAttribClasses = function(hook_name, attr, cb){
|
|||
|
||||
=== aceGetFilterStack
|
||||
|
||||
Called from: src/static/js/linestylefilter.js
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -143,7 +143,7 @@ later used by the aceCreateDomLine hook (documented above).
|
|||
|
||||
=== aceEditorCSS
|
||||
|
||||
Called from: src/static/js/ace.js
|
||||
Called from: `src/static/js/ace.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
|
@ -152,7 +152,7 @@ should be an array of resource urls or paths relative to the plugins directory.
|
|||
|
||||
=== aceInitInnerdocbodyHead
|
||||
|
||||
Called from: src/static/js/ace.js
|
||||
Called from: `src/static/js/ace.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -165,7 +165,7 @@ editor HTML document.
|
|||
|
||||
=== aceEditEvent
|
||||
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -182,7 +182,7 @@ your plugin) that use the information provided by the edit event.
|
|||
|
||||
=== aceRegisterNonScrollableEditEvents
|
||||
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
|
@ -203,7 +203,7 @@ exports.aceRegisterNonScrollableEditEvents = function(){
|
|||
|
||||
=== aceRegisterBlockElements
|
||||
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
|
@ -213,7 +213,7 @@ call for those elements.
|
|||
|
||||
=== aceInitialized
|
||||
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -228,7 +228,7 @@ use in formatting hooks.
|
|||
|
||||
=== postAceInit
|
||||
|
||||
Called from: src/static/js/pad.js
|
||||
Called from: `src/static/js/pad.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -240,7 +240,7 @@ Things in context:
|
|||
|
||||
=== postToolbarInit
|
||||
|
||||
Called from: src/static/js/pad_editbar.js
|
||||
Called from: `src/static/js/pad_editbar.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -255,14 +255,14 @@ Usage examples:
|
|||
|
||||
=== postTimesliderInit
|
||||
|
||||
Called from: src/static/js/timeslider.js
|
||||
Called from: `src/static/js/timeslider.js`
|
||||
|
||||
There doesn't appear to be any example available of this particular hook being
|
||||
used, but it gets fired after the timeslider is all set up.
|
||||
|
||||
=== goToRevisionEvent
|
||||
|
||||
Called from: src/static/js/broadcast.js
|
||||
Called from: `src/static/js/broadcast.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -274,7 +274,7 @@ be any example available of this particular hook being used.
|
|||
|
||||
=== userJoinOrUpdate
|
||||
|
||||
Called from: src/static/js/pad_userlist.js
|
||||
Called from: `src/static/js/pad_userlist.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
|
527
doc/api/hooks_client-side.md
Normal file
|
@ -0,0 +1,527 @@
|
|||
# Client-side hooks
|
||||
|
||||
Most of these hooks are called during or in order to set up the formatting
|
||||
process.
|
||||
|
||||
## documentReady
|
||||
Called from: `src/templates/pad.html`
|
||||
|
||||
Things in context:
|
||||
|
||||
nothing
|
||||
|
||||
This hook proxies the functionality of jQuery's `$(document).ready` event.
|
||||
|
||||
## aceDomLinePreProcessLineAttributes
|
||||
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. domline - The current DOM line being processed
|
||||
2. cls - The class of the current block element (useful for styling)
|
||||
|
||||
This hook is called for elements in the DOM that have the "lineMarkerAttribute"
|
||||
set. You can add elements into this category with the aceRegisterBlockElements
|
||||
hook above. This hook is run BEFORE the numbered and ordered lists logic is
|
||||
applied.
|
||||
|
||||
The return value of this hook should have the following structure:
|
||||
|
||||
`{ preHtml: String, postHtml: String, processedMarker: Boolean }`
|
||||
|
||||
The preHtml and postHtml values will be added to the HTML display of the
|
||||
element, and if processedMarker is true, the engine won't try to process it any
|
||||
more.
|
||||
|
||||
## aceDomLineProcessLineAttributes
|
||||
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. domline - The current DOM line being processed
|
||||
2. cls - The class of the current block element (useful for styling)
|
||||
|
||||
This hook is called for elements in the DOM that have the "lineMarkerAttribute"
|
||||
set. You can add elements into this category with the aceRegisterBlockElements
|
||||
hook above. This hook is run AFTER the ordered and numbered lists logic is
|
||||
applied.
|
||||
|
||||
The return value of this hook should have the following structure:
|
||||
|
||||
`{ preHtml: String, postHtml: String, processedMarker: Boolean }`
|
||||
|
||||
The preHtml and postHtml values will be added to the HTML display of the
|
||||
element, and if processedMarker is true, the engine won't try to process it any
|
||||
more.
|
||||
|
||||
## aceCreateDomLine
|
||||
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. domline - the current DOM line being processed
|
||||
2. cls - The class of the current element (useful for styling)
|
||||
|
||||
This hook is called for any line being processed by the formatting engine,
|
||||
unless the aceDomLineProcessLineAttributes hook from above returned true, in
|
||||
which case this hook is skipped.
|
||||
|
||||
The return value of this hook should have the following structure:
|
||||
|
||||
`{ extraOpenTags: String, extraCloseTags: String, cls: String }`
|
||||
|
||||
extraOpenTags and extraCloseTags will be added before and after the element in
|
||||
question, and cls will be the new class of the element going forward.
|
||||
|
||||
## acePostWriteDomLineHTML
|
||||
|
||||
Called from: `src/static/js/domline.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. node - the DOM node that just got written to the page
|
||||
|
||||
This hook is for right after a node has been fully formatted and written to the
|
||||
page.
|
||||
|
||||
## aceAttribsToClasses
|
||||
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. linestylefilter - the JavaScript object that's currently processing the ace
|
||||
attributes
|
||||
2. key - the current attribute being processed
|
||||
3. value - the value of the attribute being processed
|
||||
|
||||
This hook is called during the attribute processing procedure, and should be
|
||||
used to translate key, value pairs into valid HTML classes that can be inserted
|
||||
into the DOM.
|
||||
|
||||
The return value for this function should be a list of classes, which will then
|
||||
be parsed into a valid class string.
|
||||
|
||||
## aceAttribClasses
|
||||
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
1. Attributes - Object of Attributes
|
||||
|
||||
This hook is called when attributes are investigated on a line. It is useful if
|
||||
you want to add another attribute type or property type to a pad.
|
||||
|
||||
Example:
|
||||
```
|
||||
exports.aceAttribClasses = function(hook_name, attr, cb){
|
||||
attr.sub = 'tag:sub';
|
||||
cb(attr);
|
||||
}
|
||||
```
|
||||
|
||||
## aceGetFilterStack
|
||||
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. linestylefilter - the JavaScript object that's currently processing the ace
|
||||
attributes
|
||||
2. browser - an object indicating which browser is accessing the page
|
||||
|
||||
This hook is called to apply custom regular expression filters to a set of
|
||||
styles. The one example available is the ep_linkify plugin, which adds internal
|
||||
links. They use it to find the telltale `[[ ]]` syntax that signifies internal
|
||||
links, and finding that syntax, they add in the internalHref attribute to be
|
||||
later used by the aceCreateDomLine hook (documented above).
|
||||
|
||||
## aceEditorCSS
|
||||
|
||||
Called from: `src/static/js/ace.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
This hook is provided to allow custom CSS files to be loaded. The return value
|
||||
should be an array of resource urls or paths relative to the plugins directory.
|
||||
|
||||
## aceInitInnerdocbodyHead
|
||||
|
||||
Called from: `src/static/js/ace.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. iframeHTML - the HTML of the editor iframe up to this point, in array format
|
||||
|
||||
This hook is called during the creation of the editor HTML. The array should
|
||||
have lines of HTML added to it, giving the plugin author a chance to add in
|
||||
meta, script, link, and other tags that go into the `<head>` element of the
|
||||
editor HTML document.
|
||||
|
||||
## aceEditEvent
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. callstack - a bunch of information about the current action
|
||||
2. editorInfo - information about the user who is making the change
|
||||
3. rep - information about where the change is being made
|
||||
4. documentAttributeManager - information about attributes in the document (this
|
||||
is a mystery to me)
|
||||
|
||||
This hook is made available to edit the edit events that might occur when
|
||||
changes are made. Currently you can change the editor information, some of the
|
||||
meanings of the edit, and so on. You can also make internal changes (internal to
|
||||
your plugin) that use the information provided by the edit event.
|
||||
|
||||
## aceRegisterNonScrollableEditEvents
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
When aceEditEvent (documented above) finishes processing the event, it scrolls
|
||||
the viewport to make caret visible to the user, but if you don't want that
|
||||
behavior to happen you can use this hook to register which edit events should
|
||||
not scroll viewport. The return value of this hook should be a list of event
|
||||
names.
|
||||
|
||||
Example:
|
||||
```
|
||||
exports.aceRegisterNonScrollableEditEvents = function(){
|
||||
return [ 'repaginate', 'updatePageCount' ];
|
||||
}
|
||||
```
|
||||
|
||||
## aceRegisterBlockElements
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context: None
|
||||
|
||||
The return value of this hook will add elements into the "lineMarkerAttribute"
|
||||
category, making the aceDomLineProcessLineAttributes hook (documented below)
|
||||
call for those elements.
|
||||
|
||||
## aceInitialized
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. editorInfo - information about the user who will be making changes through
|
||||
the interface, and a way to insert functions into the main ace object (see
|
||||
ep_headings)
|
||||
2. rep - information about where the user's cursor is
|
||||
3. documentAttributeManager - some kind of magic
|
||||
|
||||
This hook is for inserting further information into the ace engine, for later
|
||||
use in formatting hooks.
|
||||
|
||||
## postAceInit
|
||||
|
||||
Called from: `src/static/js/pad.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. ace - the ace object that is applied to this editor.
|
||||
2. clientVars - Object containing client-side configuration such as author ID
|
||||
and plugin settings. Your plugin can manipulate this object via the
|
||||
`clientVars` server-side hook.
|
||||
3. pad - the pad object of the current pad.
|
||||
|
||||
## postToolbarInit
|
||||
|
||||
Called from: `src/static/js/pad_editbar.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. ace - the ace object that is applied to this editor.
|
||||
2. toolbar - Editbar instance. See below for the Editbar documentation.
|
||||
|
||||
Can be used to register custom actions to the toolbar.
|
||||
|
||||
Usage examples:
|
||||
|
||||
* [https://github.com/tiblu/ep_authorship_toggle]()
|
||||
|
||||
## postTimesliderInit
|
||||
|
||||
Called from: `src/static/js/timeslider.js`
|
||||
|
||||
There doesn't appear to be any example available of this particular hook being
|
||||
used, but it gets fired after the timeslider is all set up.
|
||||
|
||||
## goToRevisionEvent
|
||||
|
||||
Called from: `src/static/js/broadcast.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. rev - The newRevision
|
||||
|
||||
This hook gets fired both on timeslider load (as timeslider shows a new
|
||||
revision) and when the new revision is showed to a user. There doesn't appear to
|
||||
be any example available of this particular hook being used.
|
||||
|
||||
## userJoinOrUpdate
|
||||
|
||||
Called from: `src/static/js/pad_userlist.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. info - the user information
|
||||
|
||||
This hook is called on the client side whenever a user joins or changes. This
|
||||
can be used to create notifications or an alternate user list.
|
||||
|
||||
## `chatNewMessage`
|
||||
|
||||
Called from: `src/static/js/chat.js`
|
||||
|
||||
This hook runs on the client side whenever a chat message is received from the
|
||||
server. It can be used to create different notifications for chat messages. Hook
|
||||
functions can modify the `author`, `authorName`, `duration`, `rendered`,
|
||||
`sticky`, `text`, and `timeStr` context properties to change how the message is
|
||||
processed. The `text` and `timeStr` properties may contain HTML and come
|
||||
pre-sanitized; plugins should be careful to sanitize any added user input to
|
||||
avoid introducing an XSS vulnerability.
|
||||
|
||||
Context properties:
|
||||
|
||||
* `authorName`: The display name of the user that wrote the message.
|
||||
* `author`: The author ID of the user that wrote the message.
|
||||
* `text`: Sanitized message HTML, with URLs wrapped like `<a
|
||||
href="url">url</a>`. (Note that `message.text` is not sanitized or processed
|
||||
in any way.)
|
||||
* `message`: The raw message object as received from the server, except with
|
||||
time correction and a default `authorId` property if missing. Plugins must not
|
||||
modify this object. Warning: Unlike `text`, `message.text` is not
|
||||
pre-sanitized or processed in any way.
|
||||
* `rendered` - Used to override the default message rendering. Initially set to
|
||||
`null`. If the hook function sets this to a DOM element object or a jQuery
|
||||
object, then that object will be used as the rendered message UI. Otherwise,
|
||||
if this is set to `null`, then Etherpad will render a default UI for the
|
||||
message using the other context properties.
|
||||
* `sticky` (boolean): Whether the gritter notification should fade out on its
|
||||
own or just sit there until manually closed.
|
||||
* `timestamp`: When the chat message was sent (milliseconds since epoch),
|
||||
corrected using the difference between the local clock and the server's clock.
|
||||
* `timeStr`: The message timestamp as a formatted string.
|
||||
* `duration`: How long (in milliseconds) to display the gritter notification (0
|
||||
to disable).
|
||||
|
||||
## `chatSendMessage`
|
||||
|
||||
Called from: `src/static/js/chat.js`
|
||||
|
||||
This hook runs on the client side whenever the user sends a new chat message.
|
||||
Plugins can mutate the message object to change the message text or add metadata
|
||||
to control how the message will be rendered by the `chatNewMessage` hook.
|
||||
|
||||
Context properties:
|
||||
|
||||
* `message`: The message object that will be sent to the Etherpad server.
|
||||
|
||||
## collectContentPre
|
||||
|
||||
Called from: `src/static/js/contentcollector.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. cc - the contentcollector object
|
||||
2. state - the current state of the change being made
|
||||
3. tname - the tag name of this node currently being processed
|
||||
4. styl - the style applied to the node (probably CSS) -- Note the typo
|
||||
5. cls - the HTML class string of the node
|
||||
|
||||
This hook is called before the content of a node is collected by the usual
|
||||
methods. The cc object can be used to do a bunch of things that modify the
|
||||
content of the pad. See, for example, the heading1 plugin for etherpad original.
|
||||
|
||||
E.g. if you need to apply an attribute to newly inserted characters, call
|
||||
cc.doAttrib(state, "attributeName") which results in an attribute
|
||||
attributeName=true.
|
||||
|
||||
If you want to specify also a value, call cc.doAttrib(state,
|
||||
"attributeName::value") which results in an attribute attributeName=value.
|
||||
|
||||
|
||||
## collectContentImage
|
||||
|
||||
Called from: `src/static/js/contentcollector.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. cc - the contentcollector object
|
||||
2. state - the current state of the change being made
|
||||
3. tname - the tag name of this node currently being processed
|
||||
4. style - the style applied to the node (probably CSS)
|
||||
5. cls - the HTML class string of the node
|
||||
6. node - the node being modified
|
||||
|
||||
This hook is called before the content of an image node is collected by the
|
||||
usual methods. The cc object can be used to do a bunch of things that modify the
|
||||
content of the pad.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
exports.collectContentImage = function(name, context){
|
||||
context.state.lineAttributes.img = context.node.outerHTML;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## collectContentPost
|
||||
|
||||
Called from: `src/static/js/contentcollector.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. cc - the contentcollector object
|
||||
2. state - the current state of the change being made
|
||||
3. tname - the tag name of this node currently being processed
|
||||
4. style - the style applied to the node (probably CSS)
|
||||
5. cls - the HTML class string of the node
|
||||
|
||||
This hook is called after the content of a node is collected by the usual
|
||||
methods. The cc object can be used to do a bunch of things that modify the
|
||||
content of the pad. See, for example, the heading1 plugin for etherpad original.
|
||||
|
||||
## handleClientMessage_`name`
|
||||
|
||||
Called from: `src/static/js/collab_client.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. payload - the data that got sent with the message (use it for custom message
|
||||
content)
|
||||
|
||||
This hook gets called every time the client receives a message of type `name`.
|
||||
This can most notably be used with the new HTTP API call, "sendClientsMessage",
|
||||
which sends a custom message type to all clients connected to a pad. You can
|
||||
also use this to handle existing types.
|
||||
|
||||
`collab_client.js` has a pretty extensive list of message types, if you want to
|
||||
take a look.
|
||||
|
||||
## aceStartLineAndCharForPoint-aceEndLineAndCharForPoint
|
||||
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
|
||||
Things in context:
|
||||
|
||||
1. callstack - a bunch of information about the current action
|
||||
2. editorInfo - information about the user who is making the change
|
||||
3. rep - information about where the change is being made
|
||||
4. root - the span element of the current line
|
||||
5. point - the starting/ending element where the cursor highlights
|
||||
6. documentAttributeManager - information about attributes in the document
|
||||
|
||||
This hook is provided to allow a plugin to turn DOM node selection into
|
||||
[line,char] selection. The return value should be an array of [line,char]
|
||||
|
||||
## aceKeyEvent
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. callstack - a bunch of information about the current action
|
||||
2. editorInfo - information about the user who is making the change
|
||||
3. rep - information about where the change is being made
|
||||
4. documentAttributeManager - information about attributes in the document
|
||||
5. evt - the fired event
|
||||
|
||||
This hook is provided to allow a plugin to handle key events.
|
||||
The return value should be true if you have handled the event.
|
||||
|
||||
## collectContentLineText
|
||||
|
||||
Called from: `src/static/js/contentcollector.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. cc - the contentcollector object
|
||||
2. state - the current state of the change being made
|
||||
3. tname - the tag name of this node currently being processed
|
||||
4. text - the text for that line
|
||||
|
||||
This hook allows you to validate/manipulate the text before it's sent to the
|
||||
server side. To change the text, either:
|
||||
|
||||
* Set the `text` context property to the desired value and return `undefined`.
|
||||
* (Deprecated) Return a string. If a hook function changes the `text` context
|
||||
property, the return value is ignored. If no hook function changes `text` but
|
||||
multiple hook functions return a string, the first one wins.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
exports.collectContentLineText = (hookName, context) => {
|
||||
context.text = tweakText(context.text);
|
||||
};
|
||||
```
|
||||
|
||||
## collectContentLineBreak
|
||||
|
||||
Called from: `src/static/js/contentcollector.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. cc - the contentcollector object
|
||||
2. state - the current state of the change being made
|
||||
3. tname - the tag name of this node currently being processed
|
||||
|
||||
This hook is provided to allow whether the br tag should induce a new magic
|
||||
domline or not. The return value should be either true(break the line) or false.
|
||||
|
||||
## disableAuthorColorsForThisLine
|
||||
|
||||
Called from: `src/static/js/linestylefilter.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. linestylefilter - the JavaScript object that's currently processing the ace
|
||||
attributes
|
||||
2. text - the line text
|
||||
3. class - line class
|
||||
|
||||
This hook is provided to allow whether a given line should be deliniated with
|
||||
multiple authors. Multiple authors in one line cause the creation of magic span
|
||||
lines. This might not suit you and now you can disable it and handle your own
|
||||
deliniation. The return value should be either true(disable) or false.
|
||||
|
||||
## aceSetAuthorStyle
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. dynamicCSS - css manager for inner ace
|
||||
2. outerDynamicCSS - css manager for outer ace
|
||||
3. parentDynamicCSS - css manager for parent document
|
||||
4. info - author style info
|
||||
5. author - author info
|
||||
6. authorSelector - css selector for author span in inner ace
|
||||
|
||||
This hook is provided to allow author highlight style to be modified. Registered
|
||||
hooks should return 1 if the plugin handles highlighting. If no plugin returns
|
||||
1, the core will use the default background-based highlighting.
|
||||
|
||||
## aceSelectionChanged
|
||||
|
||||
Called from: `src/static/js/ace2_inner.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
1. rep - information about where the user's cursor is
|
||||
2. documentAttributeManager - information about attributes in the document
|
||||
|
||||
This hook allows a plugin to react to a cursor or selection change,
|
||||
perhaps to update a UI element based on the style at the cursor location.
|
117
doc/api/hooks_overview.md
Normal file
|
@ -0,0 +1,117 @@
|
|||
# Hooks
|
||||
|
||||
A hook function is registered with a hook via the plugin's `ep.json` file. See
|
||||
the Plugins section for details. A hook may have many registered functions from
|
||||
different plugins.
|
||||
|
||||
Some hooks call their registered functions one at a time until one of them
|
||||
returns a value. Others always call all of their registered functions and
|
||||
combine the results (if applicable).
|
||||
|
||||
## Registered hook functions
|
||||
|
||||
Note: The documentation in this section applies to every hook unless the
|
||||
hook-specific documentation says otherwise.
|
||||
|
||||
### Arguments
|
||||
|
||||
Hook functions are called with three arguments:
|
||||
|
||||
1. `hookName` - The name of the hook being invoked.
|
||||
2. `context` - An object with some relevant information about the context of the
|
||||
call. See the hook-specific documentation for details.
|
||||
3. `cb` - For asynchronous operations this callback can be called to signal
|
||||
completion and optionally provide a return value. The callback takes a single
|
||||
argument, the meaning of which depends on the hook (see the "Return values"
|
||||
section for general information that applies to most hooks). This callback
|
||||
always returns `undefined`.
|
||||
|
||||
### Expected behavior
|
||||
|
||||
The presence of a callback parameter suggests that every hook function can run
|
||||
asynchronously. While that is the eventual goal, there are some legacy hooks
|
||||
that expect their hook functions to provide a value synchronously. For such
|
||||
hooks, the hook functions must do one of the following:
|
||||
|
||||
* Call the callback with a non-Promise value (`undefined` is acceptable) and
|
||||
return `undefined`, in that order.
|
||||
* Return a non-Promise value other than `undefined` (`null` is acceptable) and
|
||||
never call the callback. Note that `async` functions *always* return a
|
||||
Promise, so they must never be used for synchronous hooks.
|
||||
* Only have two parameters (`hookName` and `context`) and return any non-Promise
|
||||
value (`undefined` is acceptable).
|
||||
|
||||
For hooks that permit asynchronous behavior, the hook functions must do one or
|
||||
more of the following:
|
||||
|
||||
* Return `undefined` and call the callback, in either order.
|
||||
* Return something other than `undefined` (`null` is acceptable) and never call
|
||||
the callback. Note that `async` functions *always* return a Promise, so they
|
||||
must never call the callback.
|
||||
* Only have two parameters (`hookName` and `context`).
|
||||
|
||||
Note that the acceptable behaviors for asynchronous hook functions is a superset
|
||||
of the acceptable behaviors for synchronous hook functions.
|
||||
|
||||
WARNING: The number of parameters is determined by examining
|
||||
[Function.length](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length),
|
||||
which does not count [default
|
||||
parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters)
|
||||
or ["rest"
|
||||
parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
|
||||
To avoid problems, do not use default or rest parameters when defining hook
|
||||
functions.
|
||||
|
||||
### Return values
|
||||
|
||||
A hook function can provide a value to Etherpad in one of the following ways:
|
||||
|
||||
* Pass the desired value as the first argument to the callback.
|
||||
* Return the desired value directly. The value must not be `undefined` unless
|
||||
the hook function only has two parameters. (Hook functions with three
|
||||
parameters that want to provide `undefined` should instead use the callback.)
|
||||
* For hooks that permit asynchronous behavior, return a Promise that resolves to
|
||||
the desired value.
|
||||
* For hooks that permit asynchronous behavior, pass a Promise that resolves to
|
||||
the desired value as the first argument to the callback.
|
||||
|
||||
Examples:
|
||||
|
||||
```javascript
|
||||
exports.exampleOne = (hookName, context, callback) => {
|
||||
return 'valueOne';
|
||||
};
|
||||
|
||||
exports.exampleTwo = (hookName, context, callback) => {
|
||||
callback('valueTwo');
|
||||
return;
|
||||
};
|
||||
|
||||
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
|
||||
exports.exampleThree = (hookName, context, callback) => {
|
||||
return new Promise('valueThree');
|
||||
};
|
||||
|
||||
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
|
||||
exports.exampleFour = (hookName, context, callback) => {
|
||||
callback(new Promise('valueFour'));
|
||||
return;
|
||||
};
|
||||
|
||||
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
|
||||
exports.exampleFive = async (hookName, context) => {
|
||||
// Note that this function is async, so it actually returns a Promise that
|
||||
// is resolved to 'valueFive'.
|
||||
return 'valueFive';
|
||||
};
|
||||
```
|
||||
|
||||
Etherpad collects the values provided by the hook functions into an array,
|
||||
filters out all `undefined` values, then flattens the array one level.
|
||||
Flattening one level makes it possible for a hook function to behave as if it
|
||||
were multiple separate hook functions.
|
||||
|
||||
For example: Suppose a hook has eight registered functions that return the
|
||||
following values: `1`, `[2]`, `['3a', '3b']` `[[4]]`, `undefined`,
|
||||
`[undefined]`, `[]`, and `null`. The value returned to the caller of the hook is
|
||||
`[1, 2, '3a', '3b', [4], undefined, null]`.
|
|
@ -2,7 +2,7 @@
|
|||
These hooks are called on server-side.
|
||||
|
||||
=== loadSettings
|
||||
Called from: src/node/server.ts
|
||||
Called from: `src/node/server.ts`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -11,7 +11,7 @@ Things in context:
|
|||
Use this hook to receive the global settings in your plugin.
|
||||
|
||||
=== shutdown
|
||||
Called from: src/node/server.ts
|
||||
Called from: `src/node/server.ts`
|
||||
|
||||
Things in context: None
|
||||
|
||||
|
@ -34,7 +34,7 @@ exports.shutdown = async (hookName, context) => {
|
|||
----
|
||||
|
||||
=== pluginUninstall
|
||||
Called from: src/static/js/pluginfw/installer.js
|
||||
Called from: `src/static/js/pluginfw/installer.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -43,7 +43,7 @@ Things in context:
|
|||
If this hook returns an error, the callback to the uninstall function gets an error as well. This mostly seems useful for handling additional features added in based on the installation of other plugins, which is pretty cool!
|
||||
|
||||
=== pluginInstall
|
||||
Called from: src/static/js/pluginfw/installer.js
|
||||
Called from: `src/static/js/pluginfw/installer.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
@ -123,7 +123,7 @@ Context properties:
|
|||
|
||||
=== expressCloseServer
|
||||
|
||||
Called from: src/node/hooks/express.js
|
||||
Called from: `src/node/hooks/express.js`
|
||||
|
||||
Things in context: Nothing
|
||||
|
||||
|
@ -142,7 +142,7 @@ exports.expressCloseServer = async () => {
|
|||
----
|
||||
|
||||
=== eejsBlock_`<name>`
|
||||
Called from: src/node/eejs/index.js
|
||||
Called from: `src/node/eejs/index.js`
|
||||
|
||||
Things in context:
|
||||
|
||||
|
|
1103
doc/api/hooks_server-side.md
Normal file
686
doc/api/http_api.md
Normal file
|
@ -0,0 +1,686 @@
|
|||
# HTTP API
|
||||
|
||||
## What can I do with this API?
|
||||
|
||||
The API gives another web application control of the pads. The basic functions are
|
||||
|
||||
* create/delete pads
|
||||
* grant/forbid access to pads
|
||||
* get/set pad content
|
||||
|
||||
The API is designed in a way, so you can reuse your existing user system with their permissions, and map it to Etherpad. Means: Your web application still has to do authentication, but you can tell Etherpad via the api, which visitors should get which permissions. This allows Etherpad to fit into any web application and extend it with real-time functionality. You can embed the pads via an iframe into your website.
|
||||
|
||||
Take a look at [HTTP API client libraries](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) to check if a library in your favorite programming language is available.
|
||||
|
||||
### OpenAPI
|
||||
|
||||
OpenAPI (formerly swagger) definitions are exposed under `/api/openapi.json` (latest) and `/api/{version}/openapi.json`. You can use official tools like [Swagger Editor](https://editor.swagger.io/) to view and explore them.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
|
||||
|
||||
Portal maps the internal userid to an etherpad author.
|
||||
|
||||
|
||||
#### Request
|
||||
|
||||
```http
|
||||
GET /api/1/createAuthorIfNotExistsFor?apikey=secret&name=Michael&authorMapper=7
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": {"authorID": "a.s8oes9dhwrvt0zif"}}
|
||||
```
|
||||
|
||||
#### Request
|
||||
> Portal maps the internal userid to an etherpad group:
|
||||
|
||||
```http
|
||||
GET http://pad.domain/api/1/createGroupIfNotExistsFor?apikey=secret&groupMapper=7
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": {"groupID": "g.s8oes9dhwrvt0zif"}}
|
||||
```
|
||||
|
||||
> Portal creates a pad in the userGroup
|
||||
|
||||
#### Request
|
||||
|
||||
```http
|
||||
GET http://pad.domain/api/1/createGroupPad?apikey=secret&groupID=g.s8oes9dhwrvt0zif&padName=samplePad&text=This is the first sentence in the pad
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": null}
|
||||
```
|
||||
|
||||
> Portal starts the session for the user on the group:
|
||||
|
||||
#### Request
|
||||
|
||||
```http
|
||||
GET http://pad.domain/api/1/createSession?apikey=secret&groupID=g.s8oes9dhwrvt0zif&authorID=a.s8oes9dhwrvt0zif&validUntil=1312201246
|
||||
```
|
||||
|
||||
### Response
|
||||
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": {"sessionID": "s.s8oes9dhwrvt0zif"}}
|
||||
```
|
||||
|
||||
Portal places the cookie "sessionID" with the given value on the client and creates an iframe including the pad.
|
||||
|
||||
### Example 2
|
||||
|
||||
A portal (such as WordPress) wants to transform the contents of a pad that multiple admins edited into a blog post.
|
||||
|
||||
Portal retrieves the contents of the pad for entry into the db as a blog post:
|
||||
|
||||
> Request: `http://pad.domain/api/1/getText?apikey=secret&padID=g.s8oes9dhwrvt0zif$123`
|
||||
>
|
||||
> Response: `{code: 0, message:"ok", data: {text:"Welcome Text"}}`
|
||||
|
||||
Portal submits content into new blog post
|
||||
|
||||
> Portal.AddNewBlog(content)
|
||||
|
||||
## Usage
|
||||
|
||||
### API version
|
||||
The latest version is `1.2.15`
|
||||
|
||||
The current version can be queried via /api.
|
||||
|
||||
### Request Format
|
||||
|
||||
The API is accessible via HTTP. Starting from **1.8**, API endpoints can be invoked indifferently via GET or POST.
|
||||
|
||||
The URL of the HTTP request is of the form: `/api/$APIVERSION/$FUNCTIONNAME`. $APIVERSION depends on the endpoint you want to use. Depending on the verb you use (GET or POST) **parameters** can be passed differently.
|
||||
|
||||
When invoking via GET (mandatory until **1.7.5** included), parameters must be included in the query string (example: `/api/$APIVERSION/$FUNCTIONNAME?apikey=<APIKEY>¶m1=value1`). Please note that starting with nodejs 8.14+ the total size of HTTP request headers has been capped to 8192 bytes. This limits the quantity of data that can be sent in an API request.
|
||||
|
||||
Starting from Etherpad **1.8** it is also possible to invoke the HTTP API via POST. In this case, querystring parameters will still be accepted, but **any parameter with the same name sent via POST will take precedence**. If you need to send large chunks of text (for example, for `setText()`) it is advisable to invoke via POST.
|
||||
|
||||
Example with cURL using GET (toy example, no encoding):
|
||||
```
|
||||
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname&text=this_text_will_NOT_be_encoded_by_curl_use_next_example"
|
||||
```
|
||||
|
||||
Example with cURL using GET (better example, encodes text):
|
||||
```
|
||||
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname" --get --data-urlencode "text=Text sent via GET with proper encoding. For big documents, please use POST"
|
||||
```
|
||||
|
||||
Example with cURL using POST:
|
||||
```
|
||||
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname" --data-urlencode "text=Text sent via POST with proper encoding. For big texts (>8 KB), use this method"
|
||||
```
|
||||
|
||||
### Response Format
|
||||
Responses are valid JSON in the following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": number,
|
||||
"message": string,
|
||||
"data": obj
|
||||
}
|
||||
```
|
||||
|
||||
* **code** a return code
|
||||
* **0** everything ok
|
||||
* **1** wrong parameters
|
||||
* **2** internal error
|
||||
* **3** no such function
|
||||
* **4** no or wrong API Key
|
||||
* **message** a status message. It's ok if everything is fine, else it contains an error message
|
||||
* **data** the payload
|
||||
|
||||
### Overview
|
||||
|
||||
![API Overview](https://i.imgur.com/d0nWp.png)
|
||||
|
||||
## Data Types
|
||||
|
||||
* **groupID** a string, the unique id of a group. Format is g.16RANDOMCHARS, for example g.s8oes9dhwrvt0zif
|
||||
* **sessionID** a string, the unique id of a session. Format is s.16RANDOMCHARS, for example s.s8oes9dhwrvt0zif
|
||||
* **authorID** a string, the unique id of an author. Format is a.16RANDOMCHARS, for example a.s8oes9dhwrvt0zif
|
||||
* **readOnlyID** a string, the unique id of a readonly relation to a pad. Format is r.16RANDOMCHARS, for example r.s8oes9dhwrvt0zif
|
||||
* **padID** a string, format is GROUPID$PADNAME, for example the pad test of group g.s8oes9dhwrvt0zif has padID g.s8oes9dhwrvt0zif$test
|
||||
|
||||
### Authentication
|
||||
|
||||
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad deployment. This token will be random string, generated by Etherpad at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad. Only Etherpad and the requesting application knows this key. Token management will not be exposed through this API.
|
||||
|
||||
### Node Interoperability
|
||||
|
||||
All functions will also be available through a node module accessible from other node.js applications.
|
||||
|
||||
## API Methods
|
||||
|
||||
### Groups
|
||||
Pads can belong to a group. The padID of grouppads is starting with a groupID like `g.asdfasdfasdfasdf$test`
|
||||
|
||||
#### createGroup()
|
||||
* API >= 1
|
||||
|
||||
creates a new group
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
|
||||
|
||||
#### createGroupIfNotExistsFor(groupMapper)
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application group ids to Etherpad group ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
|
||||
|
||||
#### deleteGroup(groupID)
|
||||
* API >= 1
|
||||
|
||||
deletes a group
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"groupID does not exist", data: null}`
|
||||
|
||||
#### listPads(groupID)
|
||||
* API >= 1
|
||||
|
||||
returns all pads of this group
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padIDs : ["g.s8oes9dhwrvt0zif$test", "g.s8oes9dhwrvt0zif$test2"]}`
|
||||
* `{code: 1, message:"groupID does not exist", data: null}`
|
||||
|
||||
#### createGroupPad(groupID, padName, [text], [authorId])
|
||||
* API >= 1
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
creates a new pad in this group
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padID: "g.s8oes9dhwrvt0zif$test"}`
|
||||
* `{code: 1, message:"padName does already exist", data: null}`
|
||||
* `{code: 1, message:"groupID does not exist", data: null}`
|
||||
|
||||
#### listAllGroups()
|
||||
* API >= 1.1
|
||||
|
||||
lists all existing groups
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {groupIDs: ["g.mKjkmnAbSMtCt8eL", "g.3ADWx6sbGuAiUmCy"]}}`
|
||||
* `{code: 0, message:"ok", data: {groupIDs: []}}`
|
||||
|
||||
### Author
|
||||
These authors are bound to the attributes the users choose (color and name).
|
||||
|
||||
#### createAuthor([name])
|
||||
* API >= 1
|
||||
|
||||
creates a new author
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
|
||||
|
||||
#### createAuthorIfNotExistsFor(authorMapper [, name])
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application author ids to Etherpad author ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
|
||||
|
||||
#### listPadsOfAuthor(authorID)
|
||||
* API >= 1
|
||||
|
||||
returns an array of all pads this author contributed to
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padIDs: ["g.s8oes9dhwrvt0zif$test", "g.s8oejklhwrvt0zif$foo"]}}`
|
||||
* `{code: 1, message:"authorID does not exist", data: null}`
|
||||
|
||||
#### getAuthorName(authorID)
|
||||
* API >= 1.1
|
||||
|
||||
Returns the Author Name of the author
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorName: "John McLear"}}`
|
||||
|
||||
-> can't be deleted cause this would involve scanning all the pads where this author was
|
||||
|
||||
### Session
|
||||
Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-separated sessionIDs, allowing a user to edit pads in different groups at the same time. Only users with a valid session for this group, can access group pads. You can create a session after you authenticated the user at your web application, to give them access to the pads. You should save the sessionID of this session and delete it after the user logged out.
|
||||
|
||||
#### createSession(groupID, authorID, validUntil)
|
||||
* API >= 1
|
||||
|
||||
creates a new session. validUntil is an unix timestamp in seconds
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {sessionID: "s.s8oes9dhwrvt0zif"}}`
|
||||
* `{code: 1, message:"groupID doesn't exist", data: null}`
|
||||
* `{code: 1, message:"authorID doesn't exist", data: null}`
|
||||
* `{code: 1, message:"validUntil is in the past", data: null}`
|
||||
|
||||
|
||||
#### deleteSession(sessionID)
|
||||
* API >= 1
|
||||
|
||||
deletes a session
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"sessionID does not exist", data: null}`
|
||||
|
||||
#### getSessionInfo(sessionID)
|
||||
* API >= 1
|
||||
|
||||
returns information about a session
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif", groupID: g.s8oes9dhwrvt0zif, validUntil: 1312201246}}`
|
||||
* `{code: 1, message:"sessionID does not exist", data: null}`
|
||||
|
||||
#### listSessionsOfGroup(groupID)
|
||||
* API >= 1
|
||||
|
||||
returns all sessions of a group
|
||||
|
||||
*Example returns:*
|
||||
* `{"code":0,"message":"ok","data":{"s.oxf2ras6lvhv2132":{"groupID":"g.s8oes9dhwrvt0zif","authorID":"a.akf8finncvomlqva","validUntil":2312905480}}}`
|
||||
* `{code: 1, message:"groupID does not exist", data: null}`
|
||||
|
||||
#### listSessionsOfAuthor(authorID)
|
||||
* API >= 1
|
||||
|
||||
returns all sessions of an author
|
||||
|
||||
*Example returns:*
|
||||
* `{"code":0,"message":"ok","data":{"s.oxf2ras6lvhv2132":{"groupID":"g.s8oes9dhwrvt0zif","authorID":"a.akf8finncvomlqva","validUntil":2312905480}}}`
|
||||
* `{code: 1, message:"authorID does not exist", data: null}`
|
||||
|
||||
### Pad Content
|
||||
|
||||
Pad content can be updated and retrieved through the API
|
||||
|
||||
#### getText(padID, [rev])
|
||||
* API >= 1
|
||||
|
||||
returns the text of a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {text:"Welcome Text"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### setText(padID, text, [authorId])
|
||||
* API >= 1
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
Sets the text of a pad.
|
||||
|
||||
If your text is long (>8 KB), please invoke via POST and include `text` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
* `{code: 1, message:"text too long", data: null}`
|
||||
|
||||
#### appendText(padID, text, [authorId])
|
||||
* API >= 1.2.13
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
|
||||
Appends text to a pad.
|
||||
|
||||
If your text is long (>8 KB), please invoke via POST and include `text` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
* `{code: 1, message:"text too long", data: null}`
|
||||
|
||||
#### getHTML(padID, [rev])
|
||||
* API >= 1
|
||||
|
||||
returns the text of a pad formatted as HTML
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {html:"Welcome Text<br>More Text"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### setHTML(padID, html, [authorId])
|
||||
* API >= 1
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
sets the text of a pad based on HTML, HTML must be well-formed. Malformed HTML will send a warning to the API log.
|
||||
|
||||
If `html` is long (>8 KB), please invoke via POST and include `html` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getAttributePool(padID)
|
||||
* API >= 1.2.8
|
||||
|
||||
returns the attribute pool of a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{ "code":0,
|
||||
"message":"ok",
|
||||
"data": {
|
||||
"pool":{
|
||||
"numToAttrib":{
|
||||
"0":["author","a.X4m8bBWJBZJnWGSh"],
|
||||
"1":["author","a.TotfBPzov54ihMdH"],
|
||||
"2":["author","a.StiblqrzgeNTbK05"],
|
||||
"3":["bold","true"]
|
||||
},
|
||||
"attribToNum":{
|
||||
"author,a.X4m8bBWJBZJnWGSh":0,
|
||||
"author,a.TotfBPzov54ihMdH":1,
|
||||
"author,a.StiblqrzgeNTbK05":2,
|
||||
"bold,true":3
|
||||
},
|
||||
"nextNum":4
|
||||
}
|
||||
}
|
||||
}`
|
||||
* `{"code":1,"message":"padID does not exist","data":null}`
|
||||
|
||||
#### getRevisionChangeset(padID, [rev])
|
||||
* API >= 1.2.8
|
||||
|
||||
get the changeset at a given revision, or last revision if 'rev' is not defined.
|
||||
|
||||
*Example returns:*
|
||||
* `{ "code" : 0,
|
||||
"message" : "ok",
|
||||
"data" : "Z:1>6b|5+6b$Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https://etherpad.org\n"
|
||||
}`
|
||||
* `{"code":1,"message":"padID does not exist","data":null}`
|
||||
* `{"code":1,"message":"rev is higher than the head revision of the pad","data":null}`
|
||||
|
||||
#### createDiffHTML(padID, startRev, endRev)
|
||||
* API >= 1.2.7
|
||||
|
||||
returns an object of diffs from 2 points in a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{"code":0,"message":"ok","data":{"html":"<style>\n.authora_HKIv23mEbachFYfH {background-color: #a979d9}\n.authora_n4gEeMLsv1GivNeh {background-color: #a9b5d9}\n.removed {text-decoration: line-through; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; filter: alpha(opacity=80); opacity: 0.8; }\n</style>Welcome to Etherpad!<br><br>This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!<br><br>Get involved with Etherpad at <a href=\"http://etherpad.org\">http://etherpad.org</a><br><span class=\"authora_HKIv23mEbachFYfH\">aw</span><br><br>","authors":["a.HKIv23mEbachFYfH",""]}}`
|
||||
* `{"code":4,"message":"no or wrong API Key","data":null}`
|
||||
|
||||
#### restoreRevision(padId, rev, [authorId])
|
||||
* API >= 1.2.11
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
* Example returns:*
|
||||
* `{code:0, message:"ok", data:null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
### Chat
|
||||
#### getChatHistory(padID, [start, end])
|
||||
* API >= 1.2.7
|
||||
|
||||
returns
|
||||
|
||||
* a part of the chat history, when `start` and `end` are given
|
||||
* the whole chat history, when no extra parameters are given
|
||||
|
||||
|
||||
*Example returns:*
|
||||
|
||||
* `{"code":0,"message":"ok","data":{"messages":[{"text":"foo","userId":"a.foo","time":1359199533759,"userName":"test"},{"text":"bar","userId":"a.foo","time":1359199534622,"userName":"test"}]}}`
|
||||
* `{code: 1, message:"start is higher or equal to the current chatHead", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getChatHead(padID)
|
||||
* API >= 1.2.7
|
||||
|
||||
returns the chatHead (last number of the last chat-message) of the pad
|
||||
|
||||
|
||||
*Example returns:*
|
||||
|
||||
* `{code: 0, message:"ok", data: {chatHead: 42}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### appendChatMessage(padID, text, authorID [, time])
|
||||
* API >= 1.2.12
|
||||
|
||||
creates a chat message, saves it to the database and sends it to all connected clients of this pad
|
||||
|
||||
*Example returns:*
|
||||
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"text is no string", data: null}`
|
||||
|
||||
### Pad
|
||||
Group pads are normal pads, but with the name schema GROUPID$PADNAME. A security manager controls access of them and it's forbidden for normal pads to include a $ in the name.
|
||||
|
||||
#### createPad(padID, [text], [authorId])
|
||||
* API >= 1
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
creates a new (non-group) pad. Note that if you need to create a group Pad, you should call **createGroupPad**.
|
||||
You get an error message if you use one of the following characters in the padID: "/", "?", "&" or "#".
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does already exist", data: null}`
|
||||
* `{code: 1, message:"malformed padID: Remove special characters", data: null}`
|
||||
|
||||
#### getRevisionsCount(padID)
|
||||
* API >= 1
|
||||
|
||||
returns the number of revisions of this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {revisions: 56}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getSavedRevisionsCount(padID)
|
||||
* API >= 1.2.11
|
||||
|
||||
returns the number of saved revisions of this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {savedRevisions: 42}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### listSavedRevisions(padID)
|
||||
* API >= 1.2.11
|
||||
|
||||
returns the list of saved revisions of this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {savedRevisions: [2, 42, 1337]}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### saveRevision(padID [, rev])
|
||||
* API >= 1.2.11
|
||||
|
||||
saves a revision
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### padUsersCount(padID)
|
||||
* API >= 1
|
||||
|
||||
returns the number of user that are currently editing this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padUsersCount: 5}}`
|
||||
|
||||
#### padUsers(padID)
|
||||
* API >= 1.1
|
||||
|
||||
returns the list of users that are currently editing this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padUsers: [{colorId:"#c1a9d9","name":"username1","timestamp":1345228793126,"id":"a.n4gEeMLsvg12452n"},{"colorId":"#d9a9cd","name":"Hmmm","timestamp":1345228796042,"id":"a.n4gEeMLsvg12452n"}]}}`
|
||||
* `{code: 0, message:"ok", data: {padUsers: []}}`
|
||||
|
||||
#### deletePad(padID)
|
||||
* API >= 1
|
||||
|
||||
deletes a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### copyPad(sourceID, destinationID[, force=false])
|
||||
* API >= 1.2.8
|
||||
|
||||
copies a pad with full history and chat. If force is true and the destination pad exists, it will be overwritten.
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### copyPadWithoutHistory(sourceID, destinationID, [force=false], [authorId])
|
||||
* API >= 1.2.15
|
||||
* `authorId` in API >= 1.3.0
|
||||
|
||||
copies a pad without copying the history and chat. If force is true and the destination pad exists, it will be overwritten.
|
||||
Note that all the revisions will be lost! In most of the cases one should use `copyPad` API instead.
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### movePad(sourceID, destinationID[, force=false])
|
||||
* API >= 1.2.8
|
||||
|
||||
moves a pad. If force is true and the destination pad exists, it will be overwritten.
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getReadOnlyID(padID)
|
||||
* API >= 1
|
||||
|
||||
returns the read only link of a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {readOnlyID: "r.s8oes9dhwrvt0zif"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getPadID(readOnlyID)
|
||||
* API >= 1.2.10
|
||||
|
||||
returns the id of a pad which is assigned to the readOnlyID
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {padID: "p.s8oes9dhwrvt0zif"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### setPublicStatus(padID, publicStatus)
|
||||
* API >= 1
|
||||
|
||||
sets a boolean for the public status of a group pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
* `{code: 1, message:"You can only get/set the publicStatus of pads that belong to a group", data: null}`
|
||||
|
||||
#### getPublicStatus(padID)
|
||||
* API >= 1
|
||||
|
||||
return true of false
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {publicStatus: true}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
* `{code: 1, message:"You can only get/set the publicStatus of pads that belong to a group", data: null}`
|
||||
|
||||
#### listAuthorsOfPad(padID)
|
||||
* API >= 1
|
||||
|
||||
returns an array of authors who contributed to this pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorIDs : ["a.s8oes9dhwrvt0zif", "a.akf8finncvomlqva"]}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### getLastEdited(padID)
|
||||
* API >= 1
|
||||
|
||||
returns the timestamp of the last revision of the pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {lastEdited: 1340815946602}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### sendClientsMessage(padID, msg)
|
||||
* API >= 1.1
|
||||
|
||||
sends a custom message of type `msg` to the pad
|
||||
|
||||
*Example returns:*
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": {}}
|
||||
```
|
||||
|
||||
```json
|
||||
{"code": 1, "message":"padID does not exist", "data": null}
|
||||
```
|
||||
|
||||
#### checkToken()
|
||||
* API >= 1.2
|
||||
|
||||
returns ok when the current api token is valid
|
||||
|
||||
*Example returns:*
|
||||
```json
|
||||
{"code":0,"message":"ok","data":null}
|
||||
```
|
||||
```json
|
||||
{"code":4,"message":"no or wrong API Key","data":null}
|
||||
```
|
||||
|
||||
### Pads
|
||||
|
||||
#### listAllPads()
|
||||
* API >= 1.2.1
|
||||
|
||||
lists all pads on this epl instance
|
||||
|
||||
*Example returns:*
|
||||
```json
|
||||
{"code": 0, "message":"ok", "data": {"padIDs": ["testPad", "thePadsOfTheOthers"]}}
|
||||
```
|
||||
|
||||
### Global
|
||||
|
||||
#### getStats()
|
||||
* API >= 1.2.14
|
||||
|
||||
get stats of the etherpad instance
|
||||
|
||||
*Example returns*
|
||||
```json
|
||||
{"code":0,"message":"ok","data":{"totalPads":3,"totalSessions": 2,"totalActivePads": 1}}
|
||||
```
|
||||
|
3
doc/api/index.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# API documentation
|
||||
|
||||
This part of the documentation is about the API of Etherpad. It is intended for developers who want to write applications that interact with Etherpad instances or plugins.
|
22
doc/api/pluginfw.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Plugin Framework
|
||||
|
||||
`require("ep_etherpad-lite/static/js/plugingfw/plugins")`
|
||||
|
||||
## plugins.update
|
||||
|
||||
`require("ep_etherpad-lite/static/js/plugingfw/plugins").update()` will use npm
|
||||
to list all installed modules and read their ep.json files, registering the
|
||||
contained hooks. A hook registration is a pair of a hook name and a function
|
||||
reference (filename for require() plus function name)
|
||||
|
||||
## hooks.callAll
|
||||
|
||||
`require("ep_etherpad-lite/static/js/plugingfw/hooks").callAll("hook_name",
|
||||
{argname:value})` will call all hook functions registered for `hook_name` with
|
||||
`{argname:value}`.
|
||||
|
||||
## hooks.aCallAll
|
||||
|
||||
?
|
||||
|
||||
## ...
|
46
doc/api/toolbar.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Toolbar controller
|
||||
src/node/utils/toolbar.js
|
||||
|
||||
## button(opts)
|
||||
* {Object} `opts`
|
||||
* `command` - this command fill be fired on the editbar on click
|
||||
* `localizationId` - will be set as `data-l10-id`
|
||||
* `class` - here you can add additional classes to the button
|
||||
|
||||
Returns: {Button}
|
||||
|
||||
Example:
|
||||
```
|
||||
var orderedlist = toolbar.button({
|
||||
command: "insertorderedlist",
|
||||
localizationId: "pad.toolbar.ol.title",
|
||||
class: "buttonicon buttonicon-insertorderedlist"
|
||||
})
|
||||
```
|
||||
|
||||
You can also create buttons with text:
|
||||
|
||||
```
|
||||
var myButton = toolbar.button({
|
||||
command: "myButton",
|
||||
localizationId: "myPlugin.toolbar.myButton",
|
||||
class: "buttontext"
|
||||
})
|
||||
```
|
||||
|
||||
## selectButton(opts)
|
||||
* {Object} `opts`
|
||||
* `id` - id of the menu item
|
||||
* `selectId` - id of the select element
|
||||
* `command` - this command fill be fired on the editbar on change
|
||||
|
||||
Returns: {SelectButton}
|
||||
|
||||
## SelectButton.addOption(value, text, attributes)
|
||||
* {String} value - The value of this option
|
||||
* {String} text - the label text used for this option
|
||||
* {Object} attributes - any additional html attributes go here (e.g. `data-l10n-id`)
|
||||
|
||||
## registerButton(name, item)
|
||||
* {String} name - used to reference the item in the toolbar config in settings.json
|
||||
* {Button|SelectButton} item - the button to add
|
18
doc/cookies.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Cookies
|
||||
|
||||
Cookies used by Etherpad.
|
||||
|
||||
| Name | Sample value | Domain | Path | Expires/max-age | Http-only | Secure | Usage description |
|
||||
|-------------------|----------------------------------|-------------|------|-----------------|-----------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| express_sid | s%3A7yCNjRmTW8ylGQ53I2IhOwYF9... | example.org | / | Session | true | true | Session ID of the [Express web framework](https://expressjs.com). When Etherpad is behind a reverse proxy, and an administrator wants to use session stickiness, he may use this cookie. If you are behind a reverse proxy, please remember to set `trustProxy: true` in `settings.json`. Set in [webaccess.js#L131](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/hooks/express/webaccess.js#L131). |
|
||||
| language | en | example.org | / | Session | false | true | The language of the UI (e.g.: `en-GB`, `it`). Set in [pad_editor.js#L111](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_editor.js#L111). |
|
||||
| prefs / prefsHttp | %7B%22epThemesExtTheme%22... | example.org | /p | year 3000 | false | true | Client-side preferences (e.g.: font family, chat always visible, show authorship colors, ...). Set in [pad_cookie.js#L49](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_cookie.js#L49). `prefs` is used if Etherpad is accessed over HTTPS, `prefsHttp` if accessed over HTTP. For more info see https://github.com/ether/etherpad-lite/issues/3179. |
|
||||
| token | t.tFzkihhhBf4xKEpCK3PU | example.org | / | 60 days | false | true | A random token representing the author, of the form `t.randomstring_of_lenght_20`. The random string is generated by the client, at ([pad.js#L55-L66](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L55-L66)). This cookie is always set by the client (at [pad.js#L153-L158](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L153-L158)) without any solicitation from the server. It is used for all the pads accessed via the web UI (not used for the HTTP API). On the server side, its value is accessed at [SecurityManager.js#L33](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/db/SecurityManager.js#L33). |
|
||||
|
||||
For more info, visit the related discussion at https://github.com/ether/etherpad-lite/issues/3563.
|
||||
|
||||
Etherpad HTTP API clients may make use (if they choose so) to send another cookie:
|
||||
|
||||
| Name | Sample value | Domain | Usage description |
|
||||
|-----------|------------------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| sessionID | s.1c70968b333b25476a2c7bdd0e0bed17 | example.org | Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-separated sessionIDs, allowing a user to edit pads in different groups at the same time. More info - https://github.com/ether/etherpad-lite/blob/develop/doc/api/http_api.md#session |
|
19
doc/demo.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Demo of Etherpad
|
||||
|
||||
This is a demo of Etherpad. It shows how to use Etherpad and what it can do.
|
||||
|
||||
## The toolbar
|
||||
|
||||
![The toolbar](/etherpad_basic.png)
|
||||
|
||||
## The pad
|
||||
|
||||
![The pad](/etherpad_demo.gif)
|
||||
|
||||
## Etherpad with a virtual webcam
|
||||
|
||||
![Etherpad full features](/etherpad_full_features.png)
|
||||
|
||||
## Etherpad skin variants
|
||||
|
||||
![Etherpad skin variants](/etherpad_skin_variants.gif)
|
257
doc/docker.md
Normal file
|
@ -0,0 +1,257 @@
|
|||
# Docker
|
||||
|
||||
The official Docker image is available on https://hub.docker.com/r/etherpad/etherpad.
|
||||
|
||||
## Downloading from Docker Hub
|
||||
If you are ok downloading a [prebuilt image from Docker Hub](https://hub.docker.com/r/etherpad/etherpad), these are the commands:
|
||||
```bash
|
||||
# gets the latest published version
|
||||
docker pull etherpad/etherpad
|
||||
|
||||
# gets a specific version
|
||||
docker pull etherpad/etherpad:1.8.0
|
||||
```
|
||||
|
||||
## Build a personalized container
|
||||
|
||||
If you want to use a personalized settings file, **you will have to rebuild your image**.
|
||||
All of the following instructions are as a member of the `docker` group.
|
||||
By default, the Etherpad Docker image is built and run in `production` mode: no development dependencies are installed, and asset bundling speeds up page load time.
|
||||
|
||||
### Rebuilding with custom settings
|
||||
Edit `<BASEDIR>/settings.json.docker` at your will. When rebuilding the image, this file will be copied inside your image and renamed to `settings.json`.
|
||||
|
||||
**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to `settings.json.template`.
|
||||
|
||||
### Rebuilding including some plugins
|
||||
If you want to install some plugins in your container, it is sufficient to list them in the ETHERPAD_PLUGINS build variable.
|
||||
The variable value has to be a space separated, double quoted list of plugin names (see examples).
|
||||
|
||||
Some plugins will need personalized settings. Just refer to the previous section, and include them in your custom `settings.json.docker`.
|
||||
|
||||
### Rebuilding including export functionality for DOC/PDF/ODT
|
||||
|
||||
If you want to be able to export your pads to DOC/PDF/ODT files, you can install
|
||||
either Abiword or Libreoffice via setting a build variable.
|
||||
|
||||
#### Via Abiword
|
||||
|
||||
For installing Abiword, set the `INSTALL_ABIWORD` build variable to any value.
|
||||
|
||||
Also, you will need to configure the path to the abiword executable
|
||||
via setting the `abiword` property in `<BASEDIR>/settings.json.docker` to
|
||||
`/usr/bin/abiword` or via setting the environment variable `ABIWORD` to
|
||||
`/usr/bin/abiword`.
|
||||
|
||||
#### Via Libreoffice
|
||||
|
||||
For installing Libreoffice instead, set the `INSTALL_SOFFICE` build variable
|
||||
to any value.
|
||||
|
||||
Also, you will need to configure the path to the libreoffice executable
|
||||
via setting the `soffice` property in `<BASEDIR>/settings.json.docker` to
|
||||
`/usr/bin/soffice` or via setting the environment variable `SOFFICE` to
|
||||
`/usr/bin/soffice`.
|
||||
|
||||
### Examples
|
||||
|
||||
Build a Docker image from the currently checked-out code:
|
||||
```bash
|
||||
docker build --tag <YOUR_USERNAME>/etherpad .
|
||||
```
|
||||
|
||||
Include two plugins in the container:
|
||||
```bash
|
||||
docker build --build-arg ETHERPAD_PLUGINS="ep_comments_page ep_author_neat" --tag <YOUR_USERNAME>/etherpad .
|
||||
```
|
||||
|
||||
## Running your instance:
|
||||
|
||||
To run your instance:
|
||||
```bash
|
||||
docker run --detach --publish <DESIRED_PORT>:9001 <YOUR_USERNAME>/etherpad
|
||||
```
|
||||
|
||||
And point your browser to `http://<YOUR_IP>:<DESIRED_PORT>`
|
||||
|
||||
## Options available by default
|
||||
|
||||
The `settings.json.docker` available by default allows to control almost every setting via environment variables.
|
||||
|
||||
### General
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ------------------ | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `TITLE` | The name of the instance | `Etherpad` |
|
||||
| `FAVICON` | favicon default name, or a fully specified URL to your own favicon | `favicon.ico` |
|
||||
| `DEFAULT_PAD_TEXT` | The default text of a pad | `Welcome to Etherpad! This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents! Get involved with Etherpad at https://etherpad.org` |
|
||||
| `IP` | IP which etherpad should bind at. Change to `::` for IPv6 | `0.0.0.0` |
|
||||
| `PORT` | port which etherpad should bind at | `9001` |
|
||||
| `ADMIN_PASSWORD` | the password for the `admin` user (leave unspecified if you do not want to create it) | |
|
||||
| `USER_PASSWORD` | the password for the first user `user` (leave unspecified if you do not want to create it) | |
|
||||
|
||||
|
||||
### Database
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ------------- | -------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `DB_TYPE` | a database supported by https://www.npmjs.com/package/ueberdb2 | not set, thus will fall back to `DirtyDB` (please choose one instead) |
|
||||
| `DB_HOST` | the host of the database | |
|
||||
| `DB_PORT` | the port of the database | |
|
||||
| `DB_NAME` | the database name | |
|
||||
| `DB_USER` | a database user with sufficient permissions to create tables | |
|
||||
| `DB_PASS` | the password for the database username | |
|
||||
| `DB_CHARSET` | the character set for the tables (only required for MySQL) | |
|
||||
| `DB_FILENAME` | in case `DB_TYPE` is `DirtyDB` or `sqlite`, the database file. | `var/dirty.db`, `var/etherpad.sq3` |
|
||||
|
||||
If your database needs additional settings, you will have to use a personalized `settings.json.docker` and rebuild the container (or otherwise put the updated `settings.json` inside your image).
|
||||
|
||||
|
||||
### Pad Options
|
||||
|
||||
| Variable | Description | Default |
|
||||
| -------------------------------- | ----------- | ------- |
|
||||
| `PAD_OPTIONS_NO_COLORS` | | `false` |
|
||||
| `PAD_OPTIONS_SHOW_CONTROLS` | | `true` |
|
||||
| `PAD_OPTIONS_SHOW_CHAT` | | `true` |
|
||||
| `PAD_OPTIONS_SHOW_LINE_NUMBERS` | | `true` |
|
||||
| `PAD_OPTIONS_USE_MONOSPACE_FONT` | | `false` |
|
||||
| `PAD_OPTIONS_USER_NAME` | | `null` |
|
||||
| `PAD_OPTIONS_USER_COLOR` | | `null` |
|
||||
| `PAD_OPTIONS_RTL` | | `false` |
|
||||
| `PAD_OPTIONS_ALWAYS_SHOW_CHAT` | | `false` |
|
||||
| `PAD_OPTIONS_CHAT_AND_USERS` | | `false` |
|
||||
| `PAD_OPTIONS_LANG` | | `null` |
|
||||
|
||||
|
||||
### Shortcuts
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ----------------------------------- | ------------------------------------------------ | ------- |
|
||||
| `PAD_SHORTCUTS_ENABLED_ALT_F9` | focus on the File Menu and/or editbar | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_ALT_C` | focus on the Chat window | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_S` | save a revision | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_Z` | undo/redo | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_Y` | redo | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_I` | italic | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_B` | bold | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_U` | underline | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_H` | backspace | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_5` | strike through | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_1` | ordered list | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_2` | shows a gritter popup showing a line author | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_L` | unordered list | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_N` | ordered list | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_C` | clear authorship | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_DELETE` | | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_RETURN` | | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_ESC` | in mozilla versions 14-19 avoid reconnecting pad | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_TAB` | indent | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_CTRL_HOME` | scroll to top of pad | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_PAGE_UP` | | `true` |
|
||||
| `PAD_SHORTCUTS_ENABLED_PAGE_DOWN` | | `true` |
|
||||
|
||||
|
||||
### Skins
|
||||
|
||||
You can use the UI skin variants builder at `/p/test#skinvariantsbuilder`
|
||||
|
||||
For the colibris skin only, you can choose how to render the three main containers:
|
||||
* toolbar (top menu with icons)
|
||||
* editor (containing the text of the pad)
|
||||
* background (area outside of editor, mostly visible when using page style)
|
||||
|
||||
For each of the 3 containers you can choose 4 color combinations:
|
||||
* super-light
|
||||
* light
|
||||
* dark
|
||||
* super-dark
|
||||
|
||||
For the editor container, you can also make it full width by adding `full-width-editor` variant (by default editor is rendered as a page, with a max-width of 900px).
|
||||
|
||||
| Variable | Description | Default |
|
||||
| --------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------- |
|
||||
| `SKIN_NAME` | either `no-skin`, `colibris` or an existing directory under `src/static/skins` | `colibris` |
|
||||
| `SKIN_VARIANTS` | multiple skin variants separated by spaces | `super-light-toolbar super-light-editor light-background` |
|
||||
|
||||
|
||||
### Logging
|
||||
|
||||
| Variable | Description | Default |
|
||||
| -------------------- | ---------------------------------------------------- | ------- |
|
||||
| `LOGLEVEL` | valid values are `DEBUG`, `INFO`, `WARN` and `ERROR` | `INFO` |
|
||||
| `DISABLE_IP_LOGGING` | Privacy: disable IP logging | `false` |
|
||||
|
||||
|
||||
### Advanced
|
||||
|
||||
| Variable | Description | Default |
|
||||
|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `COOKIE_SAME_SITE` | Value of the SameSite cookie property. | `"Lax"` |
|
||||
| `COOKIE_SESSION_LIFETIME` | How long (ms) a user can be away before they must log in again. | `864000000` (10 days) |
|
||||
| `COOKIE_SESSION_REFRESH_INTERVAL` | How often (ms) to write the latest cookie expiration time. | `86400000` (1 day) |
|
||||
| `SHOW_SETTINGS_IN_ADMIN_PAGE` | hide/show the settings.json in admin page | `true` |
|
||||
| `TRUST_PROXY` | set to `true` if you are using a reverse proxy in front of Etherpad (for example: Traefik for SSL termination via Let's Encrypt). This will affect security and correctness of the logs if not done | `false` |
|
||||
| `IMPORT_MAX_FILE_SIZE` | maximum allowed file size when importing a pad, in bytes. | `52428800` (50 MB) |
|
||||
| `IMPORT_EXPORT_MAX_REQ_PER_IP` | maximum number of import/export calls per IP. | `10` |
|
||||
| `IMPORT_EXPORT_RATE_LIMIT_WINDOW` | the call rate for import/export requests will be estimated in this time window (in milliseconds) | `90000` |
|
||||
| `COMMIT_RATE_LIMIT_DURATION` | duration of the rate limit window for commits by individual users/IPs (in seconds) | `1` |
|
||||
| `COMMIT_RATE_LIMIT_POINTS` | maximum number of changes per IP to allow during the rate limit window | `10` |
|
||||
| `SUPPRESS_ERRORS_IN_PAD_TEXT` | Should we suppress errors from being visible in the default Pad Text? | `false` |
|
||||
| `REQUIRE_SESSION` | If this option is enabled, a user must have a session to access pads. This effectively allows only group pads to be accessed. | `false` |
|
||||
| `EDIT_ONLY` | Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. | `false` |
|
||||
| `MINIFY` | If true, all css & js will be minified before sending to the client. This will improve the loading performance massively, but makes it difficult to debug the javascript/css | `true` |
|
||||
| `MAX_AGE` | How long may clients use served javascript code (in seconds)? Not setting this may cause problems during deployment. Set to 0 to disable caching. | `21600` (6 hours) |
|
||||
| `ABIWORD` | Absolute path to the Abiword executable. Abiword is needed to get advanced import/export features of pads. Setting it to null disables Abiword and will only allow plain text and HTML import/exports. | `null` |
|
||||
| `SOFFICE` | This is the absolute path to the soffice executable. LibreOffice can be used in lieu of Abiword to export pads. Setting it to null disables LibreOffice exporting. | `null` |
|
||||
| `TIDY_HTML` | Path to the Tidy executable. Tidy is used to improve the quality of exported pads. Setting it to null disables Tidy. | `null` |
|
||||
| `ALLOW_UNKNOWN_FILE_ENDS` | Allow import of file types other than the supported ones: txt, doc, docx, rtf, odt, html & htm | `true` |
|
||||
| `REQUIRE_AUTHENTICATION` | This setting is used if you require authentication of all users. Note: "/admin" always requires authentication. | `false` |
|
||||
| `REQUIRE_AUTHORIZATION` | Require authorization by a module, or a user with is_admin set, see below. | `false` |
|
||||
| `AUTOMATIC_RECONNECTION_TIMEOUT` | Time (in seconds) to automatically reconnect pad when a "Force reconnect" message is shown to user. Set to 0 to disable automatic reconnection. | `0` |
|
||||
| `FOCUS_LINE_PERCENTAGE_ABOVE` | Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line above of the viewport. Set to 0 to disable extra scrolling | `0` |
|
||||
| `FOCUS_LINE_PERCENTAGE_BELOW` | Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line below of the viewport. Set to 0 to disable extra scrolling | `0` |
|
||||
| `FOCUS_LINE_PERCENTAGE_ARROW_UP` | Percentage of viewport height to be additionally scrolled when user presses arrow up in the line of the top of the viewport. Set to 0 to let the scroll to be handled as default by Etherpad | `0` |
|
||||
| `FOCUS_LINE_DURATION` | Time (in milliseconds) used to animate the scroll transition. Set to 0 to disable animation | `0` |
|
||||
| `FOCUS_LINE_CARET_SCROLL` | Flag to control if it should scroll when user places the caret in the last line of the viewport | `false` |
|
||||
| `SOCKETIO_MAX_HTTP_BUFFER_SIZE` | The maximum size (in bytes) of a single message accepted via Socket.IO. If a client sends a larger message, its connection gets closed to prevent DoS (memory exhaustion) attacks. | `10000` |
|
||||
| `LOAD_TEST` | Allow Load Testing tools to hit the Etherpad Instance. WARNING: this will disable security on the instance. | `false` |
|
||||
| `DUMP_ON_UNCLEAN_EXIT` | Enable dumping objects preventing a clean exit of Node.js. WARNING: this has a significant performance impact. | `false` |
|
||||
| `EXPOSE_VERSION` | Expose Etherpad version in the web interface and in the Server http header. Do not enable on production machines. | `false` |
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
Use a Postgres database, no admin user enabled:
|
||||
|
||||
```shell
|
||||
docker run -d \
|
||||
--name etherpad \
|
||||
-p 9001:9001 \
|
||||
-e 'DB_TYPE=postgres' \
|
||||
-e 'DB_HOST=db.local' \
|
||||
-e 'DB_PORT=4321' \
|
||||
-e 'DB_NAME=etherpad' \
|
||||
-e 'DB_USER=dbusername' \
|
||||
-e 'DB_PASS=mypassword' \
|
||||
etherpad/etherpad
|
||||
```
|
||||
|
||||
Run enabling the administrative user `admin`:
|
||||
|
||||
```shell
|
||||
docker run -d \
|
||||
--name etherpad \
|
||||
-p 9001:9001 \
|
||||
-e 'ADMIN_PASSWORD=supersecret' \
|
||||
etherpad/etherpad
|
||||
```
|
||||
|
||||
Run a test instance running DirtyDB on a persistent volume:
|
||||
|
||||
```
|
||||
docker run -d \
|
||||
-v etherpad_data:/opt/etherpad-lite/var \
|
||||
-p 9001:9001 \
|
||||
etherpad/etherpad
|
||||
```
|
15
doc/documentation.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# About this Documentation
|
||||
|
||||
<!-- type=misc -->
|
||||
|
||||
The goal of this documentation is to comprehensively explain Etherpad,
|
||||
both from a reference and a conceptual point of view.
|
||||
|
||||
Where appropriate, property types, method arguments, and the arguments
|
||||
provided to event handlers are detailed in a list underneath the topic
|
||||
heading.
|
||||
|
||||
Every `.html` file is generated based on the corresponding
|
||||
`.md` file in the `doc/api/` folder in the source tree. The
|
||||
documentation is generated using the `src/bin/doc/generate.js` program.
|
||||
The HTML template is located at `doc/template.html`.
|
39
doc/index.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
# https://vitepress.dev/reference/default-theme-home-page
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: "Etherpad"
|
||||
text: "Next generation collaborative document editing"
|
||||
tagline: Make your documents come alive
|
||||
image:
|
||||
src: /favicon.ico
|
||||
alt: Etherpad hero image
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Install
|
||||
link: /docker
|
||||
- theme: alt
|
||||
text: API documentation
|
||||
link: /api/
|
||||
features:
|
||||
- icon: ⚡️
|
||||
title: Real-time editing
|
||||
details: Collaborate with others in real-time. See changes as they happen in an instant
|
||||
- icon: 🛠️
|
||||
title: Extensible plugin framework
|
||||
details: Add new features to Etherpad with plugins. Create your own or use existing ones
|
||||
- icon: 💬
|
||||
title: Real-time chat
|
||||
details: Communicate with others while editing. Discuss changes and share ideas
|
||||
- icon: 📝
|
||||
title: Rich text editing
|
||||
details: Format text, add images, and more. Create beautiful documents with ease
|
||||
- icon: 🌐
|
||||
title: Multi-language support
|
||||
details: Use Etherpad in your preferred language. Localize the interface and documents
|
||||
- icon: 📦
|
||||
title: Easy to install
|
||||
details: Get started quickly with Docker. Install Etherpad with a single command
|
||||
---
|
||||
|
114
doc/localization.md
Normal file
|
@ -0,0 +1,114 @@
|
|||
# Localization
|
||||
Etherpad provides a multi-language user interface, that's apart from your users' content, so users from different countries can collaborate on a single document, while still having the user interface displayed in their mother tongue.
|
||||
|
||||
|
||||
## Translating
|
||||
We rely on https://translatewiki.net to handle the translation process for us, so if you'd like to help...
|
||||
|
||||
1. Sign up at https://translatewiki.net
|
||||
2. Visit our [TWN project page](https://translatewiki.net/wiki/Translating:Etherpad_lite)
|
||||
3. Click on `Translate Etherpad lite interface`
|
||||
4. Choose a target language, you'd like to translate our interface to, and hit `Fetch`
|
||||
5. Start translating!
|
||||
|
||||
Translations will be send back to us regularly and will eventually appear in the next release.
|
||||
|
||||
## Implementation
|
||||
|
||||
### Server-side
|
||||
`/src/locales` contains files for all supported languages which contain the translated strings. Translation files are simple `*.json` files and look like this:
|
||||
|
||||
```json
|
||||
{ "pad.modals.connected": "Connecté."
|
||||
, "pad.modals.uderdup": "Ouvrir dans une nouvelle fenêtre."
|
||||
, "pad.toolbar.unindent.title": "Dèsindenter"
|
||||
, "pad.toolbar.undo.title": "Annuler (Ctrl-Z)"
|
||||
, "timeslider.pageTitle": "{{appTitle}} Curseur temporel"
|
||||
, ...
|
||||
}
|
||||
```
|
||||
|
||||
Each translation consists of a key (the id of the string that is to be translated) and the translated string. Terms in curly braces must not be touched but left as they are, since they represent a dynamically changing part of the string like a variable. Imagine a message welcoming a user: `Welcome, {{userName}}!` would be translated as `Ahoy, {{userName}}!` in pirate.
|
||||
|
||||
### Client-side
|
||||
We use a `language` cookie to save your language settings if you change them. If you don't, we autodetect your locale using information from your browser. Then, the preferred language is fed into a library called [html10n.js](https://github.com/marcelklehr/html10n.js), which loads the appropriate translations and applies them to our templates. Its features include translation params, pluralization, include rules and a nice javascript API.
|
||||
|
||||
|
||||
|
||||
## Localizing plugins
|
||||
|
||||
### 1. Mark the strings to translate
|
||||
|
||||
In the template files of your plugin, change all hardcoded messages/strings...
|
||||
|
||||
from:
|
||||
```html
|
||||
<option value="0">Heading 1</option>
|
||||
```
|
||||
to:
|
||||
```html
|
||||
<option data-l10n-id="ep_heading.h1" value="0"></option>
|
||||
```
|
||||
|
||||
In the javascript files of your plugin, change all hardcoded messages/strings...
|
||||
|
||||
from:
|
||||
```js
|
||||
alert ('Chat');
|
||||
```
|
||||
to:
|
||||
```js
|
||||
alert(window._('pad.chat'));
|
||||
```
|
||||
### 2. Create translate files in the locales directory of your plugin
|
||||
|
||||
* The name of the file must be the language code of the language it contains translations for (see [supported lang codes](https://joker-x.github.com/languages4translatewiki/test/); e.g. en ? English, es ? Spanish...)
|
||||
* The extension of the file must be `.json`
|
||||
* The default language is English, so your plugin should always provide `en.json`
|
||||
* In order to avoid naming conflicts, your message keys should start with the name of your plugin followed by a dot (see below)
|
||||
|
||||
*ep_your-plugin/locales/en.json*
|
||||
```
|
||||
{ "ep_your-plugin.h1": "Heading 1"
|
||||
}
|
||||
```
|
||||
|
||||
*ep_your-plugin/locales/es.json*
|
||||
```
|
||||
{ "ep_your-plugin.h1": "Título 1"
|
||||
}
|
||||
```
|
||||
|
||||
Every time the http server is started, it will auto-detect your messages and merge them automatically with the core messages.
|
||||
|
||||
### Overwrite core messages
|
||||
|
||||
You can overwrite Etherpad's core messages in your plugin's locale files.
|
||||
For example, if you want to replace `Chat` with `Notes`, simply add...
|
||||
|
||||
*ep_your-plugin/locales/en.json*
|
||||
```
|
||||
{ "ep_your-plugin.h1": "Heading 1"
|
||||
, "pad.chat": "Notes"
|
||||
}
|
||||
```
|
||||
|
||||
## Customization for Administrators
|
||||
|
||||
As an Etherpad administrator, it is possible to overwrite core messages as well as messages in plugins. These include error messages, labels, and user instructions. Whereas the localization in the source code is in separate files separated by locale, an administrator's custom localizations are in `settings.json` under the `customLocaleStrings` key, with each locale separated by a sub-key underneath.
|
||||
|
||||
For example, let's say you want to change the text on the "New Pad" button on Etherpad's home page. If you look in `locales/en.json` (or `locales/en-gb.json`) you'll see the key for this text is `"index.newPad"`. You could add the following to `settings.json`:
|
||||
|
||||
```
|
||||
"customLocaleStrings": {
|
||||
"fr": {
|
||||
"index.newPad": "Créer un document"
|
||||
},
|
||||
"en-gb": {
|
||||
"index.newPad": "Create a document"
|
||||
},
|
||||
"en": {
|
||||
"index.newPad": "Create a document"
|
||||
}
|
||||
}
|
||||
```
|
10
doc/package.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
}
|
||||
}
|
247
doc/plugins.md
Normal file
|
@ -0,0 +1,247 @@
|
|||
# Plugins
|
||||
|
||||
Etherpad allows you to extend its functionality with plugins. A plugin registers
|
||||
hooks (functions) for certain events (thus certain features) in Etherpad to
|
||||
execute its own functionality based on these events.
|
||||
|
||||
Publicly available plugins can be found in the npm registry (see
|
||||
<https://npmjs.org>). Etherpad's naming convention for plugins is to prefix your
|
||||
plugins with `ep_`. So, e.g. it's `ep_flubberworms`. Thus you can install
|
||||
plugins from npm, using `npm install --no-save --legacy-peer-deps
|
||||
ep_flubberworm` in Etherpad's root directory.
|
||||
|
||||
You can also browse to `http://yourEtherpadInstan.ce/admin/plugins`, which will
|
||||
list all installed plugins and those available on npm. It even provides
|
||||
functionality to search through all available plugins.
|
||||
|
||||
## Folder structure
|
||||
|
||||
Ideally a plugin has the following folder structure:
|
||||
|
||||
```
|
||||
ep_<plugin>/
|
||||
├ .github/
|
||||
│ └ workflows/
|
||||
│ └ npmpublish.yml ◄─ GitHub workflow to auto-publish on push
|
||||
├ static/
|
||||
│ ├ css/ ◄─ static .css files
|
||||
│ ├ images/ ◄─ static image files
|
||||
│ ├ js/
|
||||
│ │ └ index.js ◄─ static client-side code
|
||||
│ └ tests/
|
||||
│ ├ backend/
|
||||
│ │ └ specs/ ◄─ backend (server) tests
|
||||
│ └ frontend/
|
||||
│ └ specs/ ◄─ frontend (client) tests
|
||||
├ templates/ ◄─ EJS templates (.html, .js, .css, etc.)
|
||||
├ locales/
|
||||
│ ├ en.json ◄─ English (US) strings
|
||||
│ └ qqq.json ◄─ optional hints for translators
|
||||
├ .travis.yml ◄─ Travis CI config
|
||||
├ LICENSE
|
||||
├ README.md
|
||||
├ ep.json ◄─ Etherpad plugin definition
|
||||
├ index.js ◄─ server-side code
|
||||
├ package.json
|
||||
└ package-lock.json
|
||||
```
|
||||
|
||||
If your plugin includes client-side hooks, put them in `static/js/`. If you're
|
||||
adding in CSS or image files, you should put those files in `static/css/ `and
|
||||
`static/image/`, respectively, and templates go into `templates/`. Translations
|
||||
go into `locales/`. Tests go in `static/tests/backend/specs/` and
|
||||
`static/tests/frontend/specs/`.
|
||||
|
||||
A Standard directory structure like this makes it easier to navigate through
|
||||
your code. That said, do note, that this is not actually *required* to make your
|
||||
plugin run. If you want to make use of our i18n system, you need to put your
|
||||
translations into `locales/`, though, in order to have them integrated. (See
|
||||
"Localization" for more info on how to localize your plugin.)
|
||||
|
||||
## Plugin definition
|
||||
|
||||
Your plugin definition goes into `ep.json`. In this file you register your hook
|
||||
functions, indicate the parts of your plugin and the order of execution. (A
|
||||
documentation of all available events to hook into can be found in chapter
|
||||
[hooks](#all_hooks).)
|
||||
|
||||
```json
|
||||
{
|
||||
"parts": [
|
||||
{
|
||||
"name": "nameThisPartHoweverYouWant",
|
||||
"hooks": {
|
||||
"authenticate": "ep_<plugin>/<file>:functionName1",
|
||||
"expressCreateServer": "ep_<plugin>/<file>:functionName2"
|
||||
},
|
||||
"client_hooks": {
|
||||
"acePopulateDOMLine": "ep_<plugin>/<file>:functionName3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
A hook function registration maps a hook name to a hook function specification.
|
||||
The hook function specification looks like `ep_example/file.js:functionName`. It
|
||||
consists of two parts separated by a colon: a module name to `require()` and the
|
||||
name of a function exported by the named module. See
|
||||
[`module.exports`](https://nodejs.org/docs/latest/api/modules.html#modules_module_exports)
|
||||
for how to export a function.
|
||||
|
||||
For the module name you can omit the `.js` suffix, and if the file is `index.js`
|
||||
you can use just the directory name. You can also omit the module name entirely,
|
||||
in which case it defaults to the plugin name (e.g., `ep_example`).
|
||||
|
||||
You can also omit the function name. If you do, Etherpad will look for an
|
||||
exported function whose name matches the name of the hook (e.g.,
|
||||
`authenticate`).
|
||||
|
||||
If either the module name or the function name is omitted (or both), the colon
|
||||
may also be omitted unless the provided module name contains a colon. (So if the
|
||||
module name is `C:\foo.js` then the hook function specification with the
|
||||
function name omitted would be `"C:\\foo.js:"`.)
|
||||
|
||||
Examples: Suppose the plugin name is `ep_example`. All of the following are
|
||||
equivalent, and will cause the `authorize` hook to call the `exports.authorize`
|
||||
function in `index.js` from the `ep_example` plugin:
|
||||
|
||||
* `"authorize": "ep_example/index.js:authorize"`
|
||||
* `"authorize": "ep_example/index.js:"`
|
||||
* `"authorize": "ep_example/index.js"`
|
||||
* `"authorize": "ep_example/index:authorize"`
|
||||
* `"authorize": "ep_example/index:"`
|
||||
* `"authorize": "ep_example/index"`
|
||||
* `"authorize": "ep_example:authorize"`
|
||||
* `"authorize": "ep_example:"`
|
||||
* `"authorize": "ep_example"`
|
||||
* `"authorize": ":authorize"`
|
||||
* `"authorize": ":"`
|
||||
* `"authorize": ""`
|
||||
|
||||
### Client hooks and server hooks
|
||||
|
||||
There are server hooks, which will be executed on the server (e.g.
|
||||
`expressCreateServer`), and there are client hooks, which are executed on the
|
||||
client (e.g. `acePopulateDomLine`). Be sure to not make assumptions about the
|
||||
environment your code is running in, e.g. don't try to access `process`, if you
|
||||
know your code will be run on the client, and likewise, don't try to access
|
||||
`window` on the server...
|
||||
|
||||
### Styling
|
||||
|
||||
When you install a client-side plugin (e.g. one that implements at least one
|
||||
client-side hook), the plugin name is added to the `class` attribute of the div
|
||||
`#editorcontainerbox` in the main window. This gives you the opportunity of
|
||||
tuning the appearance of the main UI in your plugin.
|
||||
|
||||
For example, this is the markup with no plugins installed:
|
||||
|
||||
```html
|
||||
<div id="editorcontainerbox" class="">
|
||||
```
|
||||
|
||||
and this is the contents after installing `someplugin`:
|
||||
|
||||
```html
|
||||
<div id="editorcontainerbox" class="ep_someplugin">
|
||||
```
|
||||
|
||||
This feature was introduced in Etherpad **1.8**.
|
||||
|
||||
### Parts
|
||||
|
||||
As your plugins become more and more complex, you will find yourself in the need
|
||||
to manage dependencies between plugins. E.g. you want the hooks of a certain
|
||||
plugin to be executed before (or after) yours. You can also manage these
|
||||
dependencies in your plugin definition file `ep.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"parts": [
|
||||
{
|
||||
"name": "onepart",
|
||||
"pre": [],
|
||||
"post": ["ep_onemoreplugin/partone"]
|
||||
"hooks": {
|
||||
"storeBar": "ep_monospace/plugin:storeBar",
|
||||
"getFoo": "ep_monospace/plugin:getFoo",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "otherpart",
|
||||
"pre": ["ep_my_example/somepart", "ep_otherplugin/main"],
|
||||
"post": [],
|
||||
"hooks": {
|
||||
"someEvent": "ep_my_example/otherpart:someEvent",
|
||||
"another": "ep_my_example/otherpart:another"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Usually a plugin will add only one functionality at a time, so it will probably
|
||||
only use one `part` definition to register its hooks. However, sometimes you
|
||||
have to put different (unrelated) functionalities into one plugin. For this you
|
||||
will want use parts, so other plugins can depend on them.
|
||||
|
||||
#### pre/post
|
||||
|
||||
The `"pre"` and `"post"` definitions, affect the order in which parts of a
|
||||
plugin are executed. This ensures that plugins and their hooks are executed in
|
||||
the correct order.
|
||||
|
||||
`"pre"` lists parts that must be executed *before* the defining part. `"post"`
|
||||
lists parts that must be executed *after* the defining part.
|
||||
|
||||
You can, on a basic level, think of this as double-ended dependency listing. If
|
||||
you have a dependency on another plugin, you can make sure it loads before yours
|
||||
by putting it in `"pre"`. If you are setting up things that might need to be
|
||||
used by a plugin later, you can ensure proper order by putting it in `"post"`.
|
||||
|
||||
Note that it would be far more sane to use `"pre"` in almost any case, but if
|
||||
you want to change config variables for another plugin, or maybe modify its
|
||||
environment, `"post"` could definitely be useful.
|
||||
|
||||
Also, note that dependencies should *also* be listed in your package.json, so
|
||||
they can be `npm install`'d automagically when your plugin gets installed.
|
||||
|
||||
## Package definition
|
||||
|
||||
Your plugin must also contain a [package definition
|
||||
file](https://docs.npmjs.com/files/package.json), called package.json, in the
|
||||
project root - this file contains various metadata relevant to your plugin, such
|
||||
as the name and version number, author, project hompage, contributors, a short
|
||||
description, etc. If you publish your plugin on npm, these metadata are used for
|
||||
package search etc., but it's necessary for Etherpad plugins, even if you don't
|
||||
publish your plugin.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "ep_PLUGINNAME",
|
||||
"version": "0.0.1",
|
||||
"description": "DESCRIPTION",
|
||||
"author": "USERNAME (REAL NAME) <MAIL@EXAMPLE.COM>",
|
||||
"contributors": [],
|
||||
"dependencies": {"MODULE": "0.3.20"},
|
||||
"engines": {"node": ">=12.17.0"}
|
||||
}
|
||||
```
|
||||
|
||||
## Templates
|
||||
|
||||
If your plugin adds or modifies the front end HTML (e.g. adding buttons or
|
||||
changing their functions), you should put the necessary HTML code for such
|
||||
operations in `templates/`, in files of type ".ejs", since Etherpad uses EJS for
|
||||
HTML templating. See the following link for more information about EJS:
|
||||
<https://github.com/visionmedia/ejs>.
|
||||
|
||||
## Writing and running front-end tests for your plugin
|
||||
|
||||
Etherpad allows you to easily create front-end tests for plugins.
|
||||
|
||||
1. Create a new folder: `%your_plugin%/static/tests/frontend/specs`
|
||||
2. Put your spec file in there. (Example spec files are visible in
|
||||
`%etherpad_root_folder%/frontend/tests/specs`.)
|
||||
3. Visit http://yourserver.com/frontend/tests and your front-end tests will run.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 874 KiB After Width: | Height: | Size: 874 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 533 KiB After Width: | Height: | Size: 533 KiB |
BIN
doc/public/favicon.ico
Normal file
After Width: | Height: | Size: 127 KiB |
19
doc/skins.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Skins
|
||||
You can customize Etherpad appearance using skins.
|
||||
A skin is a directory located under `static/skins/<skin_name>`, with the following contents:
|
||||
|
||||
* `index.js`: javascript that will be run in `/`
|
||||
* `index.css`: stylesheet affecting `/`
|
||||
* `pad.js`: javascript that will be run in `/p/:padid`
|
||||
* `pad.css`: stylesheet affecting `/p/:padid`
|
||||
* `timeslider.js`: javascript that will be run in `/p/:padid/timeslider`
|
||||
* `timeslider.css`: stylesheet affecting `/p/:padid/timeslider`
|
||||
* `favicon.ico`: overrides the default favicon
|
||||
* `robots.txt`: overrides the default `robots.txt`
|
||||
|
||||
You can choose a skin changing the parameter `skinName` in `settings.json`.
|
||||
|
||||
Since Etherpad **1.7.5**, two skins are included:
|
||||
|
||||
* `no-skin`: an empty skin, leaving the default Etherpad appearance unchanged, that you can use as a guidance to develop your own.
|
||||
* `colibris`: a new, experimental skin, that will become the default in Etherpad 2.0.
|
18
doc/stats.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Statistics
|
||||
Etherpad keeps track of the goings-on inside the edit machinery. If you'd like to have a look at this, just point your browser to `/stats`.
|
||||
|
||||
We currently measure:
|
||||
|
||||
- totalUsers (counter)
|
||||
- connects (meter)
|
||||
- disconnects (meter)
|
||||
- pendingEdits (counter)
|
||||
- edits (timer)
|
||||
- failedChangesets (meter)
|
||||
- httpRequests (timer)
|
||||
- http500 (meter)
|
||||
- memoryUsage (gauge)
|
||||
|
||||
Under the hood, we are happy to rely on [measured](https://github.com/felixge/node-measured) for all our metrics needs.
|
||||
|
||||
To modify or simply access our stats in your plugin, simply `require('ep_etherpad-lite/stats')` which is a [`measured.Collection`](https://yaorg.github.io/node-measured/packages/measured-core/Collection.html).
|
|
@ -30,7 +30,8 @@
|
|||
"ep_etherpad-lite": "workspace:./src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"admin": "workspace:./admin"
|
||||
"admin": "workspace:./admin",
|
||||
"docs": "workspace:./doc"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.18.2",
|
||||
|
|
554
pnpm-lock.yaml
|
@ -15,6 +15,9 @@ importers:
|
|||
admin:
|
||||
specifier: workspace:./admin
|
||||
version: link:admin
|
||||
docs:
|
||||
specifier: workspace:./doc
|
||||
version: link:doc
|
||||
|
||||
admin:
|
||||
devDependencies:
|
||||
|
@ -122,6 +125,12 @@ importers:
|
|||
specifier: ^5.4.3
|
||||
version: 5.4.3
|
||||
|
||||
doc:
|
||||
devDependencies:
|
||||
vitepress:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
|
||||
src:
|
||||
dependencies:
|
||||
async:
|
||||
|
@ -331,6 +340,137 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/@algolia/autocomplete-core@1.9.3(algoliasearch@4.22.1):
|
||||
resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==}
|
||||
dependencies:
|
||||
'@algolia/autocomplete-plugin-algolia-insights': 1.9.3(algoliasearch@4.22.1)
|
||||
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1)
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- algoliasearch
|
||||
- search-insights
|
||||
dev: true
|
||||
|
||||
/@algolia/autocomplete-plugin-algolia-insights@1.9.3(algoliasearch@4.22.1):
|
||||
resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==}
|
||||
peerDependencies:
|
||||
search-insights: '>= 1 < 3'
|
||||
dependencies:
|
||||
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1)
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- algoliasearch
|
||||
dev: true
|
||||
|
||||
/@algolia/autocomplete-preset-algolia@1.9.3(algoliasearch@4.22.1):
|
||||
resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==}
|
||||
peerDependencies:
|
||||
'@algolia/client-search': '>= 4.9.1 < 6'
|
||||
algoliasearch: '>= 4.9.1 < 6'
|
||||
dependencies:
|
||||
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1)
|
||||
algoliasearch: 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/autocomplete-shared@1.9.3(algoliasearch@4.22.1):
|
||||
resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==}
|
||||
peerDependencies:
|
||||
'@algolia/client-search': '>= 4.9.1 < 6'
|
||||
algoliasearch: '>= 4.9.1 < 6'
|
||||
dependencies:
|
||||
algoliasearch: 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/cache-browser-local-storage@4.22.1:
|
||||
resolution: {integrity: sha512-Sw6IAmOCvvP6QNgY9j+Hv09mvkvEIDKjYW8ow0UDDAxSXy664RBNQk3i/0nt7gvceOJ6jGmOTimaZoY1THmU7g==}
|
||||
dependencies:
|
||||
'@algolia/cache-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/cache-common@4.22.1:
|
||||
resolution: {integrity: sha512-TJMBKqZNKYB9TptRRjSUtevJeQVXRmg6rk9qgFKWvOy8jhCPdyNZV1nB3SKGufzvTVbomAukFR8guu/8NRKBTA==}
|
||||
dev: true
|
||||
|
||||
/@algolia/cache-in-memory@4.22.1:
|
||||
resolution: {integrity: sha512-ve+6Ac2LhwpufuWavM/aHjLoNz/Z/sYSgNIXsinGofWOysPilQZPUetqLj8vbvi+DHZZaYSEP9H5SRVXnpsNNw==}
|
||||
dependencies:
|
||||
'@algolia/cache-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/client-account@4.22.1:
|
||||
resolution: {integrity: sha512-k8m+oegM2zlns/TwZyi4YgCtyToackkOpE+xCaKCYfBfDtdGOaVZCM5YvGPtK+HGaJMIN/DoTL8asbM3NzHonw==}
|
||||
dependencies:
|
||||
'@algolia/client-common': 4.22.1
|
||||
'@algolia/client-search': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/client-analytics@4.22.1:
|
||||
resolution: {integrity: sha512-1ssi9pyxyQNN4a7Ji9R50nSdISIumMFDwKNuwZipB6TkauJ8J7ha/uO60sPJFqQyqvvI+px7RSNRQT3Zrvzieg==}
|
||||
dependencies:
|
||||
'@algolia/client-common': 4.22.1
|
||||
'@algolia/client-search': 4.22.1
|
||||
'@algolia/requester-common': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/client-common@4.22.1:
|
||||
resolution: {integrity: sha512-IvaL5v9mZtm4k4QHbBGDmU3wa/mKokmqNBqPj0K7lcR8ZDKzUorhcGp/u8PkPC/e0zoHSTvRh7TRkGX3Lm7iOQ==}
|
||||
dependencies:
|
||||
'@algolia/requester-common': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/client-personalization@4.22.1:
|
||||
resolution: {integrity: sha512-sl+/klQJ93+4yaqZ7ezOttMQ/nczly/3GmgZXJ1xmoewP5jmdP/X/nV5U7EHHH3hCUEHeN7X1nsIhGPVt9E1cQ==}
|
||||
dependencies:
|
||||
'@algolia/client-common': 4.22.1
|
||||
'@algolia/requester-common': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/client-search@4.22.1:
|
||||
resolution: {integrity: sha512-yb05NA4tNaOgx3+rOxAmFztgMTtGBi97X7PC3jyNeGiwkAjOZc2QrdZBYyIdcDLoI09N0gjtpClcackoTN0gPA==}
|
||||
dependencies:
|
||||
'@algolia/client-common': 4.22.1
|
||||
'@algolia/requester-common': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/logger-common@4.22.1:
|
||||
resolution: {integrity: sha512-OnTFymd2odHSO39r4DSWRFETkBufnY2iGUZNrMXpIhF5cmFE8pGoINNPzwg02QLBlGSaLqdKy0bM8S0GyqPLBg==}
|
||||
dev: true
|
||||
|
||||
/@algolia/logger-console@4.22.1:
|
||||
resolution: {integrity: sha512-O99rcqpVPKN1RlpgD6H3khUWylU24OXlzkavUAMy6QZd1776QAcauE3oP8CmD43nbaTjBexZj2nGsBH9Tc0FVA==}
|
||||
dependencies:
|
||||
'@algolia/logger-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/requester-browser-xhr@4.22.1:
|
||||
resolution: {integrity: sha512-dtQGYIg6MteqT1Uay3J/0NDqD+UciHy3QgRbk7bNddOJu+p3hzjTRYESqEnoX/DpEkaNYdRHUKNylsqMpgwaEw==}
|
||||
dependencies:
|
||||
'@algolia/requester-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/requester-common@4.22.1:
|
||||
resolution: {integrity: sha512-dgvhSAtg2MJnR+BxrIFqlLtkLlVVhas9HgYKMk2Uxiy5m6/8HZBL40JVAMb2LovoPFs9I/EWIoFVjOrFwzn5Qg==}
|
||||
dev: true
|
||||
|
||||
/@algolia/requester-node-http@4.22.1:
|
||||
resolution: {integrity: sha512-JfmZ3MVFQkAU+zug8H3s8rZ6h0ahHZL/SpMaSasTCGYR5EEJsCc8SI5UZ6raPN2tjxa5bxS13BRpGSBUens7EA==}
|
||||
dependencies:
|
||||
'@algolia/requester-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@algolia/transporter@4.22.1:
|
||||
resolution: {integrity: sha512-kzWgc2c9IdxMa3YqA6TN0NW5VrKYYW/BELIn7vnLyn+U/RFdZ4lxxt9/8yq3DKV5snvoDzzO4ClyejZRdV3lMQ==}
|
||||
dependencies:
|
||||
'@algolia/cache-common': 4.22.1
|
||||
'@algolia/logger-common': 4.22.1
|
||||
'@algolia/requester-common': 4.22.1
|
||||
dev: true
|
||||
|
||||
/@ampproject/remapping@2.3.0:
|
||||
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
|
@ -548,6 +688,48 @@ packages:
|
|||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@docsearch/css@3.6.0:
|
||||
resolution: {integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==}
|
||||
dev: true
|
||||
|
||||
/@docsearch/js@3.6.0:
|
||||
resolution: {integrity: sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==}
|
||||
dependencies:
|
||||
'@docsearch/react': 3.6.0
|
||||
preact: 10.20.1
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- '@types/react'
|
||||
- react
|
||||
- react-dom
|
||||
- search-insights
|
||||
dev: true
|
||||
|
||||
/@docsearch/react@3.6.0:
|
||||
resolution: {integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==}
|
||||
peerDependencies:
|
||||
'@types/react': '>= 16.8.0 < 19.0.0'
|
||||
react: '>= 16.8.0 < 19.0.0'
|
||||
react-dom: '>= 16.8.0 < 19.0.0'
|
||||
search-insights: '>= 1 < 3'
|
||||
peerDependenciesMeta:
|
||||
'@types/react':
|
||||
optional: true
|
||||
react:
|
||||
optional: true
|
||||
react-dom:
|
||||
optional: true
|
||||
search-insights:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@algolia/autocomplete-core': 1.9.3(algoliasearch@4.22.1)
|
||||
'@algolia/autocomplete-preset-algolia': 1.9.3(algoliasearch@4.22.1)
|
||||
'@docsearch/css': 3.6.0
|
||||
algoliasearch: 4.22.1
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
dev: true
|
||||
|
||||
/@esbuild/aix-ppc64@0.19.12:
|
||||
resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -1607,6 +1789,16 @@ packages:
|
|||
resolution: {integrity: sha512-RbhOOTCNoCrbfkRyoXODZp75MlpiHMgbE5MEBZAnnnLyQNgrigEj4p0lzsMDyc1zVsJDLrivB58tgg3emX0eEA==}
|
||||
dev: true
|
||||
|
||||
/@shikijs/core@1.2.0:
|
||||
resolution: {integrity: sha512-OlFvx+nyr5C8zpcMBnSGir0YPD6K11uYhouqhNmm1qLiis4GA7SsGtu07r9gKS9omks8RtQqHrJL4S+lqWK01A==}
|
||||
dev: true
|
||||
|
||||
/@shikijs/transformers@1.2.0:
|
||||
resolution: {integrity: sha512-xKn7DtA65DQV4FOfYsrvqM80xOy2xuXnxWWKsZmHv1VII/IOuDUDsWDu3KnpeLH6wqNJWp1GRoNUsHR1aw/VhQ==}
|
||||
dependencies:
|
||||
shiki: 1.2.0
|
||||
dev: true
|
||||
|
||||
/@sinonjs/commons@2.0.0:
|
||||
resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==}
|
||||
dependencies:
|
||||
|
@ -1979,6 +2171,10 @@ packages:
|
|||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
dev: true
|
||||
|
||||
/@types/linkify-it@3.0.5:
|
||||
resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==}
|
||||
dev: true
|
||||
|
||||
/@types/lockfile@1.0.4:
|
||||
resolution: {integrity: sha512-Q8oFIHJHr+htLrTXN2FuZfg+WXVHQRwU/hC2GpUu+Q8e3FUM9EDkS2pE3R2AO1ZGu56f479ybdMCNF1DAu8cAQ==}
|
||||
dev: false
|
||||
|
@ -1993,12 +2189,23 @@ packages:
|
|||
resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==}
|
||||
dev: false
|
||||
|
||||
/@types/markdown-it@13.0.7:
|
||||
resolution: {integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==}
|
||||
dependencies:
|
||||
'@types/linkify-it': 3.0.5
|
||||
'@types/mdurl': 1.0.5
|
||||
dev: true
|
||||
|
||||
/@types/mdast@4.0.3:
|
||||
resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==}
|
||||
dependencies:
|
||||
'@types/unist': 3.0.2
|
||||
dev: false
|
||||
|
||||
/@types/mdurl@1.0.5:
|
||||
resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==}
|
||||
dev: true
|
||||
|
||||
/@types/methods@1.1.4:
|
||||
resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==}
|
||||
dev: true
|
||||
|
@ -2127,6 +2334,10 @@ packages:
|
|||
resolution: {integrity: sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ==}
|
||||
dev: false
|
||||
|
||||
/@types/web-bluetooth@0.0.20:
|
||||
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin@7.3.1(@typescript-eslint/parser@7.3.1)(eslint@8.57.0)(typescript@5.4.3):
|
||||
resolution: {integrity: sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
|
@ -2273,6 +2484,192 @@ packages:
|
|||
- '@swc/helpers'
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.2.3)(vue@3.4.21):
|
||||
resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
vite: ^5.0.0
|
||||
vue: ^3.2.25
|
||||
dependencies:
|
||||
vite: 5.2.3
|
||||
vue: 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.4.21:
|
||||
resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.0
|
||||
'@vue/shared': 3.4.21
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.0
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-dom@3.4.21:
|
||||
resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-sfc@3.4.21:
|
||||
resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.0
|
||||
'@vue/compiler-core': 3.4.21
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/compiler-ssr': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.8
|
||||
postcss: 8.4.38
|
||||
source-map-js: 1.2.0
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-ssr@3.4.21:
|
||||
resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/devtools-api@7.0.20(vue@3.4.21):
|
||||
resolution: {integrity: sha512-DGEIdotTQFll4187YGc/0awcag7UGJu9M6rE1Pxcs8AX/sGm0Ikk7UqQELmqYsyPzTT9s6OZzSPuBc4OatOXKA==}
|
||||
dependencies:
|
||||
'@vue/devtools-kit': 7.0.20(vue@3.4.21)
|
||||
transitivePeerDependencies:
|
||||
- vue
|
||||
dev: true
|
||||
|
||||
/@vue/devtools-kit@7.0.20(vue@3.4.21):
|
||||
resolution: {integrity: sha512-FgFuPuqrhQ51rR/sVi52FnGgrxJ3X1bvNra/SkBzPhxJVhfyL5w2YUJZI1FgCvtLAyPSomJNdvlG415ZbJsr6w==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
'@vue/devtools-shared': 7.0.20
|
||||
hookable: 5.5.3
|
||||
mitt: 3.0.1
|
||||
perfect-debounce: 1.0.0
|
||||
speakingurl: 14.0.1
|
||||
vue: 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/devtools-shared@7.0.20:
|
||||
resolution: {integrity: sha512-E6CiCaYr6ZWOCYJgWodXcPCXxB12vgbUA1X1sG0F1tK5Bo5I35GJuTR8LBJLFHV0VpwLWvyrIi9drT1ZbuJxlg==}
|
||||
dependencies:
|
||||
rfdc: 1.3.1
|
||||
dev: true
|
||||
|
||||
/@vue/reactivity@3.4.21:
|
||||
resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/runtime-core@3.4.21:
|
||||
resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/runtime-dom@3.4.21:
|
||||
resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==}
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
csstype: 3.1.3
|
||||
dev: true
|
||||
|
||||
/@vue/server-renderer@3.4.21(vue@3.4.21):
|
||||
resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==}
|
||||
peerDependencies:
|
||||
vue: 3.4.21
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.4.21
|
||||
'@vue/shared': 3.4.21
|
||||
vue: 3.4.21
|
||||
dev: true
|
||||
|
||||
/@vue/shared@3.4.21:
|
||||
resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}
|
||||
dev: true
|
||||
|
||||
/@vueuse/core@10.9.0(vue@3.4.21):
|
||||
resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==}
|
||||
dependencies:
|
||||
'@types/web-bluetooth': 0.0.20
|
||||
'@vueuse/metadata': 10.9.0
|
||||
'@vueuse/shared': 10.9.0(vue@3.4.21)
|
||||
vue-demi: 0.14.7(vue@3.4.21)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
dev: true
|
||||
|
||||
/@vueuse/integrations@10.9.0(focus-trap@7.5.4)(vue@3.4.21):
|
||||
resolution: {integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==}
|
||||
peerDependencies:
|
||||
async-validator: '*'
|
||||
axios: '*'
|
||||
change-case: '*'
|
||||
drauu: '*'
|
||||
focus-trap: '*'
|
||||
fuse.js: '*'
|
||||
idb-keyval: '*'
|
||||
jwt-decode: '*'
|
||||
nprogress: '*'
|
||||
qrcode: '*'
|
||||
sortablejs: '*'
|
||||
universal-cookie: '*'
|
||||
peerDependenciesMeta:
|
||||
async-validator:
|
||||
optional: true
|
||||
axios:
|
||||
optional: true
|
||||
change-case:
|
||||
optional: true
|
||||
drauu:
|
||||
optional: true
|
||||
focus-trap:
|
||||
optional: true
|
||||
fuse.js:
|
||||
optional: true
|
||||
idb-keyval:
|
||||
optional: true
|
||||
jwt-decode:
|
||||
optional: true
|
||||
nprogress:
|
||||
optional: true
|
||||
qrcode:
|
||||
optional: true
|
||||
sortablejs:
|
||||
optional: true
|
||||
universal-cookie:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vueuse/core': 10.9.0(vue@3.4.21)
|
||||
'@vueuse/shared': 10.9.0(vue@3.4.21)
|
||||
focus-trap: 7.5.4
|
||||
vue-demi: 0.14.7(vue@3.4.21)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
dev: true
|
||||
|
||||
/@vueuse/metadata@10.9.0:
|
||||
resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==}
|
||||
dev: true
|
||||
|
||||
/@vueuse/shared@10.9.0(vue@3.4.21):
|
||||
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.7(vue@3.4.21)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
dev: true
|
||||
|
||||
/accepts@1.3.8:
|
||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
@ -2332,6 +2729,25 @@ packages:
|
|||
uri-js: 4.4.1
|
||||
dev: false
|
||||
|
||||
/algoliasearch@4.22.1:
|
||||
resolution: {integrity: sha512-jwydKFQJKIx9kIZ8Jm44SdpigFwRGPESaxZBaHSV0XWN2yBJAOT4mT7ppvlrpA4UGzz92pqFnVKr/kaZXrcreg==}
|
||||
dependencies:
|
||||
'@algolia/cache-browser-local-storage': 4.22.1
|
||||
'@algolia/cache-common': 4.22.1
|
||||
'@algolia/cache-in-memory': 4.22.1
|
||||
'@algolia/client-account': 4.22.1
|
||||
'@algolia/client-analytics': 4.22.1
|
||||
'@algolia/client-common': 4.22.1
|
||||
'@algolia/client-personalization': 4.22.1
|
||||
'@algolia/client-search': 4.22.1
|
||||
'@algolia/logger-common': 4.22.1
|
||||
'@algolia/logger-console': 4.22.1
|
||||
'@algolia/requester-browser-xhr': 4.22.1
|
||||
'@algolia/requester-common': 4.22.1
|
||||
'@algolia/requester-node-http': 4.22.1
|
||||
'@algolia/transporter': 4.22.1
|
||||
dev: true
|
||||
|
||||
/ansi-colors@4.1.1:
|
||||
resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==}
|
||||
engines: {node: '>=6'}
|
||||
|
@ -3732,6 +4148,12 @@ packages:
|
|||
/flatted@3.2.9:
|
||||
resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==}
|
||||
|
||||
/focus-trap@7.5.4:
|
||||
resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==}
|
||||
dependencies:
|
||||
tabbable: 6.2.0
|
||||
dev: true
|
||||
|
||||
/follow-redirects@1.15.6:
|
||||
resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==}
|
||||
engines: {node: '>=4.0'}
|
||||
|
@ -4124,6 +4546,10 @@ packages:
|
|||
resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/hookable@5.5.3:
|
||||
resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}
|
||||
dev: true
|
||||
|
||||
/html-encoding-sniffer@4.0.0:
|
||||
resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
@ -4679,6 +5105,17 @@ packages:
|
|||
react: 18.2.0
|
||||
dev: true
|
||||
|
||||
/magic-string@0.30.8:
|
||||
resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
dev: true
|
||||
|
||||
/mark.js@8.11.1:
|
||||
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
|
||||
dev: true
|
||||
|
||||
/mdast-util-to-hast@13.1.0:
|
||||
resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==}
|
||||
dependencies:
|
||||
|
@ -4822,6 +5259,10 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/minisearch@6.3.0:
|
||||
resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==}
|
||||
dev: true
|
||||
|
||||
/minizlib@2.1.2:
|
||||
resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}
|
||||
engines: {node: '>= 8'}
|
||||
|
@ -4830,6 +5271,10 @@ packages:
|
|||
yallist: 4.0.0
|
||||
dev: false
|
||||
|
||||
/mitt@3.0.1:
|
||||
resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
|
||||
dev: true
|
||||
|
||||
/mkdirp@1.0.4:
|
||||
resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -5143,6 +5588,10 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/perfect-debounce@1.0.0:
|
||||
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
|
||||
dev: true
|
||||
|
||||
/picocolors@1.0.0:
|
||||
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
|
||||
dev: true
|
||||
|
@ -5182,6 +5631,10 @@ packages:
|
|||
source-map-js: 1.2.0
|
||||
dev: true
|
||||
|
||||
/preact@10.20.1:
|
||||
resolution: {integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==}
|
||||
dev: true
|
||||
|
||||
/prelude-ls@1.2.1:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
@ -5486,7 +5939,6 @@ packages:
|
|||
|
||||
/rfdc@1.3.1:
|
||||
resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==}
|
||||
dev: false
|
||||
|
||||
/rimraf@3.0.2:
|
||||
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
|
||||
|
@ -5661,6 +6113,12 @@ packages:
|
|||
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/shiki@1.2.0:
|
||||
resolution: {integrity: sha512-xLhiTMOIUXCv5DqJ4I70GgQCtdlzsTqFLZWcMHHG3TAieBUbvEGthdrlPDlX4mL/Wszx9C6rEcxU6kMlg4YlxA==}
|
||||
dependencies:
|
||||
'@shikijs/core': 1.2.0
|
||||
dev: true
|
||||
|
||||
/side-channel@1.0.5:
|
||||
resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
@ -5768,6 +6226,11 @@ packages:
|
|||
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
|
||||
dev: false
|
||||
|
||||
/speakingurl@14.0.1:
|
||||
resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/split-grid@1.0.11:
|
||||
resolution: {integrity: sha512-ELtFtxc3r5we5GZfe6Fi0BFFxIi2M6BY1YEntBscKRDD3zx4JVHqx2VnTRSQu1BixCYSTH3MTjKd4esI2R7EgQ==}
|
||||
dev: true
|
||||
|
@ -5908,6 +6371,10 @@ packages:
|
|||
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
|
||||
dev: false
|
||||
|
||||
/tabbable@6.2.0:
|
||||
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
|
||||
dev: true
|
||||
|
||||
/tapable@2.2.1:
|
||||
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
@ -6372,11 +6839,96 @@ packages:
|
|||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/vitepress@1.0.1:
|
||||
resolution: {integrity: sha512-eNr5pOBppYUUjEhv8S0S2t9Tv95LQ6mMeHj6ivaGwfHxpov70Vduuwl/QQMDRznKDSaP0WKV7a82Pb4JVOaqEw==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
markdown-it-mathjax3: ^4
|
||||
postcss: ^8
|
||||
peerDependenciesMeta:
|
||||
markdown-it-mathjax3:
|
||||
optional: true
|
||||
postcss:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@docsearch/css': 3.6.0
|
||||
'@docsearch/js': 3.6.0
|
||||
'@shikijs/core': 1.2.0
|
||||
'@shikijs/transformers': 1.2.0
|
||||
'@types/markdown-it': 13.0.7
|
||||
'@vitejs/plugin-vue': 5.0.4(vite@5.2.3)(vue@3.4.21)
|
||||
'@vue/devtools-api': 7.0.20(vue@3.4.21)
|
||||
'@vueuse/core': 10.9.0(vue@3.4.21)
|
||||
'@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21)
|
||||
focus-trap: 7.5.4
|
||||
mark.js: 8.11.1
|
||||
minisearch: 6.3.0
|
||||
shiki: 1.2.0
|
||||
vite: 5.2.3
|
||||
vue: 3.4.21
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- '@types/node'
|
||||
- '@types/react'
|
||||
- '@vue/composition-api'
|
||||
- async-validator
|
||||
- axios
|
||||
- change-case
|
||||
- drauu
|
||||
- fuse.js
|
||||
- idb-keyval
|
||||
- jwt-decode
|
||||
- less
|
||||
- lightningcss
|
||||
- nprogress
|
||||
- qrcode
|
||||
- react
|
||||
- react-dom
|
||||
- sass
|
||||
- search-insights
|
||||
- sortablejs
|
||||
- stylus
|
||||
- sugarss
|
||||
- terser
|
||||
- typescript
|
||||
- universal-cookie
|
||||
dev: true
|
||||
|
||||
/void-elements@3.1.0:
|
||||
resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/vue-demi@0.14.7(vue@3.4.21):
|
||||
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.0.0-rc.1
|
||||
vue: ^3.0.0-0 || ^2.6.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.4.21
|
||||
dev: true
|
||||
|
||||
/vue@3.4.21:
|
||||
resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.21
|
||||
'@vue/compiler-sfc': 3.4.21
|
||||
'@vue/runtime-dom': 3.4.21
|
||||
'@vue/server-renderer': 3.4.21(vue@3.4.21)
|
||||
'@vue/shared': 3.4.21
|
||||
dev: true
|
||||
|
||||
/w3c-xmlserializer@5.0.0:
|
||||
resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==}
|
||||
engines: {node: '>=18'}
|
||||
|
|
|
@ -2,3 +2,4 @@ packages:
|
|||
- src
|
||||
- admin
|
||||
- bin
|
||||
- doc
|
||||
|
|