Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

roosterjs-content-model-core

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roosterjs-content-model-core - npm Package Compare versions

Comparing version 9.8.1 to 9.9.0

6

lib-amd/command/paste/paste.d.ts

@@ -1,2 +0,2 @@

import type { PasteType, ClipboardData, IEditor } from 'roosterjs-content-model-types';
import type { PasteTypeOrGetter, ClipboardData, IEditor } from 'roosterjs-content-model-types';
/**

@@ -6,4 +6,4 @@ * Paste into editor using a clipboardData object

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteType?: PasteType): void;
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteTypeOrGetter?: PasteTypeOrGetter): void;

@@ -9,7 +9,7 @@ define(["require", "exports", "./mergePasteContent", "../createModelFromHtml/convertInlineCss", "./createPasteFragment", "./generatePasteOptionFromPlugins", "./retrieveHtmlInfo"], function (require, exports, mergePasteContent_1, convertInlineCss_1, createPasteFragment_1, generatePasteOptionFromPlugins_1, retrieveHtmlInfo_1) {

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
function paste(editor, clipboardData, pasteType) {
function paste(editor, clipboardData, pasteTypeOrGetter) {
var _a;
if (pasteType === void 0) { pasteType = 'normal'; }
if (pasteTypeOrGetter === void 0) { pasteTypeOrGetter = 'normal'; }
editor.focus();

@@ -25,2 +25,5 @@ var trustedHTMLHandler = editor.getTrustedHTMLHandler();

var doc = createDOMFromHtml(clipboardData.rawHtml, trustedHTMLHandler);
var pasteType = typeof pasteTypeOrGetter == 'function'
? pasteTypeOrGetter(doc, clipboardData)
: pasteTypeOrGetter;
// 2. Handle HTML from clipboard

@@ -27,0 +30,0 @@ var htmlFromClipboard = (0, retrieveHtmlInfo_1.retrieveHtmlInfo)(doc, clipboardData);

@@ -1,2 +0,2 @@

import type { PasteType, ClipboardData, IEditor } from 'roosterjs-content-model-types';
import type { PasteTypeOrGetter, ClipboardData, IEditor } from 'roosterjs-content-model-types';
/**

@@ -6,4 +6,4 @@ * Paste into editor using a clipboardData object

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteType?: PasteType): void;
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteTypeOrGetter?: PasteTypeOrGetter): void;

@@ -10,7 +10,7 @@ import { cloneModelForPaste, mergePasteContent } from './mergePasteContent';

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
export function paste(editor, clipboardData, pasteType) {
export function paste(editor, clipboardData, pasteTypeOrGetter) {
var _a;
if (pasteType === void 0) { pasteType = 'normal'; }
if (pasteTypeOrGetter === void 0) { pasteTypeOrGetter = 'normal'; }
editor.focus();

@@ -26,2 +26,5 @@ var trustedHTMLHandler = editor.getTrustedHTMLHandler();

var doc = createDOMFromHtml(clipboardData.rawHtml, trustedHTMLHandler);
var pasteType = typeof pasteTypeOrGetter == 'function'
? pasteTypeOrGetter(doc, clipboardData)
: pasteTypeOrGetter;
// 2. Handle HTML from clipboard

@@ -28,0 +31,0 @@ var htmlFromClipboard = retrieveHtmlInfo(doc, clipboardData);

@@ -1,2 +0,2 @@

import type { PasteType, ClipboardData, IEditor } from 'roosterjs-content-model-types';
import type { PasteTypeOrGetter, ClipboardData, IEditor } from 'roosterjs-content-model-types';
/**

@@ -6,4 +6,4 @@ * Paste into editor using a clipboardData object

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteType?: PasteType): void;
export declare function paste(editor: IEditor, clipboardData: ClipboardData, pasteTypeOrGetter?: PasteTypeOrGetter): void;

@@ -13,7 +13,7 @@ "use strict";

* @param clipboardData Clipboard data retrieved from clipboard
* @param pasteType Type of content to paste. @default normal
* @param pasteTypeOrGetter Type of content to paste or function that returns the Paste Type to use based on the document and the clipboard Data. @default normal
*/
function paste(editor, clipboardData, pasteType) {
function paste(editor, clipboardData, pasteTypeOrGetter) {
var _a;
if (pasteType === void 0) { pasteType = 'normal'; }
if (pasteTypeOrGetter === void 0) { pasteTypeOrGetter = 'normal'; }
editor.focus();

@@ -29,2 +29,5 @@ var trustedHTMLHandler = editor.getTrustedHTMLHandler();

var doc = createDOMFromHtml(clipboardData.rawHtml, trustedHTMLHandler);
var pasteType = typeof pasteTypeOrGetter == 'function'
? pasteTypeOrGetter(doc, clipboardData)
: pasteTypeOrGetter;
// 2. Handle HTML from clipboard

@@ -31,0 +34,0 @@ var htmlFromClipboard = (0, retrieveHtmlInfo_1.retrieveHtmlInfo)(doc, clipboardData);

@@ -6,6 +6,6 @@ {

"tslib": "^2.3.1",
"roosterjs-content-model-dom": "^9.8.1",
"roosterjs-content-model-types": "^9.8.1"
"roosterjs-content-model-dom": "^9.9.0",
"roosterjs-content-model-types": "^9.9.0"
},
"version": "9.8.1",
"version": "9.9.0",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "typings": "./lib/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc