Skip to content

Commit

Permalink
Extend the _forceMarkersCopy method to enable ignoring markers.
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidKossowski committed Dec 30, 2024
1 parent 1bd04d5 commit d31e728
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ckeditor5-clipboard/src/clipboardmarkersutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,19 @@ export default class ClipboardMarkersUtils extends Plugin {
public _forceMarkersCopy(
markerName: string,
executor: VoidFunction,
config: ClipboardMarkerConfiguration = {
config: ClipboardMarkerConfiguration | null = {
allowedActions: 'all',
copyPartiallySelected: true,
duplicateOnPaste: true
}
): void {
const before = this._markersToCopy.get( markerName );

this._markersToCopy.set( markerName, config );
if ( config ) {
this._markersToCopy.set( markerName, config );
} else {
this._markersToCopy.delete( markerName );
}

executor();

Expand Down

0 comments on commit d31e728

Please sign in to comment.