roosterjs-content-model-types
Advanced tools
Comparing version 9.5.1 to 9.6.0
@@ -38,2 +38,12 @@ import type { CacheSelection } from '../pluginState/CachePluginState'; | ||
reconcileSelection: (model: ContentModelDocument, newSelection: DOMSelection, oldSelection?: CacheSelection) => boolean; | ||
/** | ||
* When child list of editor content is changed, we can use this method to do sync the change from editor into content model. | ||
* This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any, | ||
* and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment | ||
* in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model | ||
* @param addedNodes Nodes added by browser during mutation | ||
* @param removedNodes Nodes removed by browser during mutation | ||
* @returns True if the changed nodes are successfully reconciled, otherwise false | ||
*/ | ||
reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean; | ||
} |
@@ -0,1 +1,2 @@ | ||
import type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument'; | ||
/** | ||
@@ -16,3 +17,3 @@ * A wrapper of MutationObserver to observe text change from editor | ||
*/ | ||
flushMutations(): void; | ||
flushMutations(newModel?: ContentModelDocument): void; | ||
} |
@@ -38,2 +38,12 @@ import type { CacheSelection } from '../pluginState/CachePluginState'; | ||
reconcileSelection: (model: ContentModelDocument, newSelection: DOMSelection, oldSelection?: CacheSelection) => boolean; | ||
/** | ||
* When child list of editor content is changed, we can use this method to do sync the change from editor into content model. | ||
* This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any, | ||
* and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment | ||
* in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model | ||
* @param addedNodes Nodes added by browser during mutation | ||
* @param removedNodes Nodes removed by browser during mutation | ||
* @returns True if the changed nodes are successfully reconciled, otherwise false | ||
*/ | ||
reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean; | ||
} |
@@ -0,1 +1,2 @@ | ||
import type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument'; | ||
/** | ||
@@ -16,3 +17,3 @@ * A wrapper of MutationObserver to observe text change from editor | ||
*/ | ||
flushMutations(): void; | ||
flushMutations(newModel?: ContentModelDocument): void; | ||
} |
@@ -38,2 +38,12 @@ import type { CacheSelection } from '../pluginState/CachePluginState'; | ||
reconcileSelection: (model: ContentModelDocument, newSelection: DOMSelection, oldSelection?: CacheSelection) => boolean; | ||
/** | ||
* When child list of editor content is changed, we can use this method to do sync the change from editor into content model. | ||
* This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any, | ||
* and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment | ||
* in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model | ||
* @param addedNodes Nodes added by browser during mutation | ||
* @param removedNodes Nodes removed by browser during mutation | ||
* @returns True if the changed nodes are successfully reconciled, otherwise false | ||
*/ | ||
reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean; | ||
} |
@@ -0,1 +1,2 @@ | ||
import type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument'; | ||
/** | ||
@@ -16,3 +17,3 @@ * A wrapper of MutationObserver to observe text change from editor | ||
*/ | ||
flushMutations(): void; | ||
flushMutations(newModel?: ContentModelDocument): void; | ||
} |
@@ -5,3 +5,3 @@ { | ||
"dependencies": {}, | ||
"version": "9.5.1", | ||
"version": "9.6.0", | ||
"main": "./lib/index.js", | ||
@@ -8,0 +8,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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1719971
20452