Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate/frontend ts #6524

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/changeset_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provides tools to create, read, and apply changesets.
## Changeset

```javascript
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
const Changeset = require('src/static/js/Changeset');
```

A changeset describes the difference between two revisions of a document. When a
Expand All @@ -24,7 +24,7 @@ A transmitted changeset looks like this:
## Attribute Pool

```javascript
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
const AttributePool = require('src/static/js/AttributePool');
```

Changesets do not include any attribute key–value pairs. Instead, they use
Expand Down
16 changes: 8 additions & 8 deletions doc/api/hooks_server-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -825,16 +825,16 @@ Context properties:
Example:

```javascript
const AttributeMap = require('ep_etherpad-lite/static/js/AttributeMap');
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
const AttributeMap = require('src/static/js/AttributeMap');
const Changeset = require('src/static/js/Changeset');

exports.getLineHTMLForExport = async (hookName, context) => {
if (!context.attribLine) return;
const [op] = Changeset.deserializeOps(context.attribLine);
if (op == null) return;
const heading = AttributeMap.fromString(op.attribs, context.apool).get('heading');
if (!heading) return;
context.lineContent = `<${heading}>${context.lineContent}</${heading}>`;
if (!context.attribLine) return;
const [op] = Changeset.deserializeOps(context.attribLine);
if (op == null) return;
const heading = AttributeMap.fromString(op.attribs, context.apool).get('heading');
if (!heading) return;
context.lineContent = `<${heading}>${context.lineContent}</${heading}>`;
};
```

Expand Down
Loading
Loading