mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[edition] Add a FreeText editor (#14970)
- add a basic UI to edit some text in a pdf; - an editor can be moved, suppressed, cut, copied, pasted, selected; - add an undo/redo manager.
This commit is contained in:
parent
1ac33c960d
commit
be1aa11986
28 changed files with 2321 additions and 18 deletions
|
@ -19,6 +19,8 @@
|
|||
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./annotation_layer_builder").AnnotationLayerBuilder} AnnotationLayerBuilder */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./annotation_editor_layer_builder").AnnotationEditorLayerBuilder} AnnotationEditorLayerBuilder */
|
||||
/** @typedef {import("./event_utils").EventBus} EventBus */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./struct_tree_builder").StructTreeLayerBuilder} StructTreeLayerBuilder */
|
||||
|
@ -208,6 +210,26 @@ class IPDFAnnotationLayerFactory {
|
|||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
class IPDFAnnotationEditorLayerFactory {
|
||||
/**
|
||||
* @param {HTMLDivElement} pageDiv
|
||||
* @param {PDFPageProxy} pdfPage
|
||||
* @param {IL10n} l10n
|
||||
* @param {AnnotationStorage} [annotationStorage] - Storage for annotation
|
||||
* data in forms.
|
||||
* @returns {AnnotationEditorLayerBuilder}
|
||||
*/
|
||||
createAnnotationEditorLayerBuilder(
|
||||
pageDiv,
|
||||
pdfPage,
|
||||
l10n = undefined,
|
||||
annotationStorage = null
|
||||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
|
@ -307,6 +329,7 @@ class IL10n {
|
|||
export {
|
||||
IDownloadManager,
|
||||
IL10n,
|
||||
IPDFAnnotationEditorLayerFactory,
|
||||
IPDFAnnotationLayerFactory,
|
||||
IPDFLinkService,
|
||||
IPDFStructTreeLayerFactory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue