Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JS Mozilla Clipboard

Empfohlene Antworten

Hi

es geht um einen Wysiwyg Editor da möchte ich per Button Klick

Code aus der Zwischenablage einfügen können (vorrausgesetzt im Mozilla

und Firefox Browser sind die Rechte gesetzt). Der Code sieht folgender

massen aus:

netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

clipboardid = Components.interfaces.nsIClipboard;

clipboard = Components.classes['@mozilla.org/widget/clipboard;1'].getService(clipboardid);

clipboardstring = Components.classes['@mozilla.org/supports-string;1'].createInstance(Components.interfaces.nsISupportsString);

var transfer = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);

transfer.addDataFlavor('text/html');

transfer.addDataFlavor('text/tab-separated-values');

transfer.addDataFlavor('application/rtf');

transfer.addDataFlavor('text/unicode');

transfer.addDataFlavor('text/plain');

clipboard.getData(transfer, clipboardid.kGlobalClipboard);

var str = new Object();

var strLength = new Object();

var bestFlavor = new Object();

transfer.getAnyTransferData(bestFlavor, str, strLength);

str = str.value.QueryInterface(Components.interfaces.nsISupportsString);

clipboard_content = (str.data.substring(0, strLength.value / 2));

Weiß jemand zufällig jemand wie ich den Code aus Word oder Excel einfügen kann?!?! Bzw. wie man den ganzen Code aus der Zwischenablage holt (egal welcher Typ: text/unicode, text/plain, usw. es ist) Bis jetzt ist es so das er Word und Excel Text nur als Plaintext erkennt.

Mfg Andreas

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.