1 | /*
|
---|
2 | Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
---|
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
|
---|
4 | */
|
---|
5 |
|
---|
6 | CKEDITOR.plugins.add( 'pastefromword',
|
---|
7 | {
|
---|
8 | init : function( editor )
|
---|
9 | {
|
---|
10 | // Register the command.
|
---|
11 | editor.addCommand( 'pastefromword', new CKEDITOR.dialogCommand( 'pastefromword' ) );
|
---|
12 |
|
---|
13 | // Register the toolbar button.
|
---|
14 | editor.ui.addButton( 'PasteFromWord',
|
---|
15 | {
|
---|
16 | label : editor.lang.pastefromword.toolbar,
|
---|
17 | command : 'pastefromword'
|
---|
18 | } );
|
---|
19 |
|
---|
20 | // Register the dialog.
|
---|
21 | CKEDITOR.dialog.add( 'pastefromword', this.path + 'dialogs/pastefromword.js' );
|
---|
22 | }
|
---|
23 | } );
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Whether the "Ignore font face definitions" checkbox is enabled by default in
|
---|
27 | * the Paste from Word dialog.
|
---|
28 | * @type Boolean
|
---|
29 | * @default true
|
---|
30 | * @example
|
---|
31 | * config.pasteFromWordIgnoreFontFace = false;
|
---|
32 | */
|
---|
33 | CKEDITOR.config.pasteFromWordIgnoreFontFace = true;
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Whether the "Remove styles definitions" checkbox is enabled by default in
|
---|
37 | * the Paste from Word dialog.
|
---|
38 | * @type Boolean
|
---|
39 | * @default false
|
---|
40 | * @example
|
---|
41 | * config.pasteFromWordRemoveStyle = true;
|
---|
42 | */
|
---|
43 | CKEDITOR.config.pasteFromWordRemoveStyle = false;
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * Whether to keep structure markup (<h1>, <h2>, etc.) or replace
|
---|
47 | * it with elements that create more similar pasting results when pasting
|
---|
48 | * content from Microsoft Word into the Paste from Word dialog.
|
---|
49 | * @type Boolean
|
---|
50 | * @default false
|
---|
51 | * @example
|
---|
52 | * config.pasteFromWordKeepsStructure = true;
|
---|
53 | */
|
---|
54 | CKEDITOR.config.pasteFromWordKeepsStructure = false;
|
---|