Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Document-Processing/Word/Word-Processor/javascript-es6/chart.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
layout: post
title: Chart in JavaScript (ES6) Document Editor Control | Syncfusion
description: Learn here all about Chart in Syncfusion JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more.
title: Chart in JavaScript (ES6) DOCX Editor Control | Syncfusion
description: Learn here all about Chart in Syncfusion JavaScript (ES6) Document Editor control of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Chart
control: Chart
documentation: ug
domainurl: ##DomainURL##
---

# Chart in JavaScript (ES6) Document Editor Control

[TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) provides chart preservation support. Using Document Editor, you can see the chart reports from your Word document.
[TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) provides chart preservation support. Using the Document Editor, you can view charts from your Word document.

The following example shows chart preservation in Document Editor.
The following example shows chart preservation in the Document Editor.

{% tabs %}
{% highlight ts tabtitle="index.ts" %}
Expand All @@ -27,7 +27,7 @@ The following example shows chart preservation in Document Editor.

## Supported Chart Types

The following chart types are supported in Document Editor
The following chart types are supported in the Document Editor:
* Scatter_Markers
* Bubble
* Area
Expand All @@ -50,4 +50,4 @@ The following chart types are supported in Document Editor

## Online Demo

Explore how to preserve charts in Word documents using the JavaScript Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/javascript/#/material3/document-editor/chart.html).
Explore how to preserve charts in Word documents using the JavaScript DOCX Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/javascript/#/material3/document-editor/chart.html).
54 changes: 27 additions & 27 deletions Document-Processing/Word/Word-Processor/javascript-es6/clipboard.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
---
layout: post
title: Clipboard in JavaScript (ES6) Document editor control | Syncfusion
description: Learn here all about Clipboard in Syncfusion JavaScript (ES6) Document editor control of Syncfusion Essential JS 2 and more.
title: Clipboard in JavaScript (ES6) DOCX Editor control | Syncfusion
description: Learn here all about Clipboard in Syncfusion JavaScript (ES6) Document Editor control of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Clipboard
control: Clipboard
documentation: ug
domainurl: ##DomainURL##
---

# Clipboard in JavaScript (ES6) Document editor control
# Clipboard in JavaScript (ES6) Document Editor control

[TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) takes advantage of system clipboard and allows you to copy or move a portion of the document into it in HTML format, so that it can be pasted in any application that supports clipboard.
[TypeScript DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/javascript-docx-editor) (Document Editor) takes advantage of the system clipboard and allows you to copy or move a portion of the document into it in HTML format, so that it can be pasted in any application that supports the clipboard.

## Copy

Copy a portion of document to system clipboard using built-in context menu of Document Editor. You can also do it programmatically using the following sample code.
Copy a portion of a document to the system clipboard using the built-in context menu of the Document Editor. You can also do it programmatically using the following sample code.

```ts
documentEditor.selection.copy();
```

## Cut

Cut a portion of document to system clipboard using built-in context menu of Document Editor. You can also do it programmatically using the following sample code.
Cut a portion of a document to the system clipboard using the built-in context menu of the Document Editor. You can also do it programmatically using the following sample code.

```ts
documentEditor.editor.cut();
```

## Paste

Due to limitations, you can paste contents from system clipboard in Document Editor only using the ‘CTRL + V keyboard shortcut.
Due to limitations, you can paste contents from the system clipboard in the Document Editor only using the 'Ctrl + V' keyboard shortcut.

>Note: Due to browser limitation of getting content from system clipboard, paste using API and context menu option doesn't work.
N> Due to browser limitation of getting content from the system clipboard, paste using the API and context menu option doesn't work.

## Local paste (copy/paste within control)

Document Editor expose API to enable local paste within the control. On enabling this, the following is performed:
* Selected contents will be stored to an internal clipboard in addition to system clipboard.
* Clipboard paste will be overridden, and internally stored data (SFDT data) that has formatted text will be pasted using paste() API in Document editor.
The Document Editor exposes an API to enable local paste within the control. On enabling this, the following is performed:
* Selected contents will be stored to an internal clipboard in addition to the system clipboard.
* Clipboard paste will be overridden, and internally stored data (SFDT data) that has formatted text will be pasted using the paste() API in the Document Editor.

Refer to the following sample code.

Expand All @@ -51,18 +51,19 @@ editor.enableLocalPaste = true;

By default, **enableLocalPaste** is false.

When local paste is enabled for a Document Editor instance, you can paste contents programmatically if the internal clipboard has stored data during last copy operation. Refer to the following sample code.
When local paste is enabled for a Document Editor instance, you can paste contents programmatically if the internal clipboard has stored data during the last copy operation. Refer to the following sample code.

```ts
documentEditor.editor.paste();
```

### Paste options in context menu

In Document editor, paste options in context menu will be in disabled state if you were try to copy/paste content from outside of Document editor. It gets enabled when **enableLocalPaste** is true and trying to copy/paste content inside Document editor.
In the Document Editor, paste options in the context menu will be in a disabled state if you try to copy/paste content from outside the Document Editor. They are enabled when **enableLocalPaste** is true and you are trying to copy/paste content inside the Document Editor.

>Note: Due to browser limitation of getting content from system clipboard, paste using API and context menu option doesn't work. Hence, the paste option is disabled in context menu.
Alternatively, you can use the keyboard shortcuts,
N> Due to browser limitation of getting content from the system clipboard, paste using the API and context menu option doesn't work. Hence, the paste option is disabled in the context menu.

Alternatively, you can use the keyboard shortcuts:

* Cut: Ctrl + X
* Copy: Ctrl + C
Expand All @@ -72,25 +73,24 @@ Alternatively, you can use the keyboard shortcuts,

|**EnableLocalPaste** |**Paste behavior details**|
|--------------------------|----------------------|
|True |Allows to paste content that is copied from the same Document Editor component alone and prevents pasting content from system clipboard. Hence the content copied from outside Document Editor component cant be pasted.<br>Browser limitation of pasting from system clipboard using API and context menu options, will be resolved. So, you can copy and paste content within the Document Editor component using API and context menu options too.|
|False|Allows to paste content from system clipboard. Hence the content copied from both the Document Editor component and outside can be pasted.<br>Browser limitation of pasting from system clipboard using API and context menu options, will remain as a limitation.|
|True |Allows pasting of content that is copied from the same Document Editor component alone and prevents pasting content from the system clipboard. Hence, the content copied from outside the Document Editor component can't be pasted.<br>Browser limitation of pasting from the system clipboard using the API and context menu options will be resolved. So, you can copy and paste content within the Document Editor component using the API and context menu options too.|
|False|Allows pasting of content from the system clipboard. Hence, the content copied from both the Document Editor component and outside can be pasted.<br>Browser limitation of pasting from the system clipboard using the API and context menu options will remain a limitation.|

Note:
* Keyboard shortcut for pasting will work properly in both cases.
* Copying content from Document Editor component and pasting outside will work properly in both cases.
N> 1. The keyboard shortcut for pasting will work properly in both cases.
N> 2. Copying content from the Document Editor component and pasting outside will work properly in both cases.

## Paste with formatting

Document Editor provides support to paste the system clipboard data with formatting. To enable clipboard paste with formatting options and copy/paste content from outside of Document editor, set the `enableLocalPaste` property in Document Editor to false and use this .NET Standard library [`Syncfusion.EJ2.WordEditor.AspNet.Core`](<https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core/>) by the web API service implementation. This library helps you to paste the system clipboard data with formatting.
The Document Editor provides support to paste the system clipboard data with formatting. To enable clipboard paste with formatting options and copy/paste content from outside the Document Editor, set the `enableLocalPaste` property in the Document Editor to `false` and use this .NET Standard library [`Syncfusion.EJ2.WordEditor.AspNet.Core`](https://www.nuget.org/packages/Syncfusion.EJ2.WordEditor.AspNet.Core/) through the web API service implementation. This library helps you to paste the system clipboard data with formatting.

Refer this [page](./web-services-overview) for more details.
Refer to this [page](./web-services-overview) for more details.

You can paste your system clipboard data in the following ways:
* **Keep Source Formatting** This option retains the character styles and direct formatting applied to the copied text. Direct formatting includes characteristics such as font size, italics, or other formatting that is not included in the paragraph style.
* **Match Destination Formatting** This option discards most of the formatting applied directly to the copied text, but it retains the formatting applied for emphasis, such as bold and italic when it is applied to only a portion of the selection. The text takes on the style characteristics of the paragraph where it is pasted. The text also takes on any direct formatting or character style properties of text that immediately precedes the cursor when the text is pasted.
* **Text Only** This option discards all formatting and non-text elements such as pictures or tables. The text takes on the style characteristics of the paragraph where it is pasted and takes on any direct formatting or character style properties of text that immediately precedes the cursor when the text is pasted. Graphical elements are discarded and tables are converted to a series of paragraphs.
* **Keep Source Formatting:** This option retains the character styles and direct formatting applied to the copied text. Direct formatting includes characteristics such as font size, italics, or other formatting that is not included in the paragraph style.
* **Match Destination Formatting:** This option discards most of the formatting applied directly to the copied text, but it retains the formatting applied for emphasis, such as bold and italic when it is applied to only a portion of the selection. The text takes on the style characteristics of the paragraph where it is pasted. The text also takes on any direct formatting or character style properties of text that immediately precedes the cursor when the text is pasted.
* **Text Only:** This option discards all formatting and non-text elements such as pictures or tables. The text takes on the style characteristics of the paragraph where it is pasted and takes on any direct formatting or character style properties of text that immediately precedes the cursor when the text is pasted. Graphical elements are discarded and tables are converted to a series of paragraphs.

This paste option appear as follows.
These paste options appear as follows.

![Image](images/paste.PNG)

Expand Down
Loading