feat: add support for disabling specific features in the PDF Editor

This commit is contained in:
alam00000 committed 2026-03-29 23:02:58 +05:30
1 parent 245b48464b
commit a617279c2d
6 files changed
+66 -1

No files matched your search

+3
View File
@@ -4,6 +4,7 @@ import { showAlert, showLoader, hideLoader } from '../ui.js';
import { formatBytes, downloadFile } from '../utils/helpers.js';
import { makeUniqueFileKey } from '../utils/deduplicate-filename.js';
import { batchDecryptIfNeeded } from '../utils/password-prompt.js';
import { getEditorDisabledCategories } from '../utils/disabled-tools.js';
const embedPdfWasmUrl = new URL(
'embedpdf-snippet/dist/pdfium.wasm',
@@ -130,7 +131,9 @@ async function handleFiles(files: FileList) {
pdfWrapper.classList.remove('hidden');
const { default: EmbedPDF } = await import('embedpdf-snippet');
const disabledCategories = getEditorDisabledCategories();
viewerInstance = EmbedPDF.init({
disabledCategories,
type: 'container',
target: pdfContainer,
worker: true,