Posts: 53
Threads: 12
Joined: May 2011
I have enabled the "Paste From Word" button in my gsconfig.php, and the button appears in the editor, but when clicked it opens the "Paste as Plain Text" dialog. Pasting formatted text in here does indeed result in plain text - all formatting is lost.
Browser is Firefox 6.02. Any suggestions? Thanks.
Posts: 2,928
Threads: 195
Joined: Feb 2011
show me the Editor-Options from your gsconfig.php, please
Posts: 53
Threads: 12
Joined: May 2011
Here it is:
Code:
define('GSEDITORTOOL',"['Cut','Copy','Paste','PasteFromWord','-','Undo','Redo','Find','Replace'],
['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList','JustifyLeft','JustifyCenter','JustifyRight','Link','Unlink', 'Image', 'RemoveFormat', 'Source'],
'/',
['Format']
");
Posts: 2,928
Threads: 195
Joined: Feb 2011
I can only guess in the moment, as I have no test-environment at hand:
1)
check that the plugin "pastefromword" exists in the folder /admin/template/js/ckeditor/plugins
2)
change your editortool-definition to
'Paste','PasteText','PasteFromWord'
so you have all paste-options and check: is there a difference between "pastetext" and "pastefromword" ?
3)
you could add this to the editor-options and check if there is a change:
Code:
CleanWordKeepsStructure : true
example:
Code:
define('GSEDITOROPTIONS', "entities : false,forceSimpleAmpersand:true,skin: 'v2',CleanWordKeepsStructure : true");
Posts: 53
Threads: 12
Joined: May 2011
Thanks for the suggestions, Connie.
1. Yes, it exists.
2. All three buttons bring up the same "Paste as Plain Text" dialog.
3. This option didn't fix the problem.
I tried the following option that I found in
this post:
Code:
define('GSEDITOROPTIONS', "forcePasteAsPlainText : false");
This did allow the pasting of formatted text, but it affects the normal paste function too, and I'm concerned it doesn't strip out the rubbish from a Word document as my pasted text got margin formats that I don't think it should. The GS wiki says about the PasteFromWord function...
Quote:All basic formats will be kept, but all the superflous formatting rubbish which MS WORD adds to text in the clipboard and which for sure will break your page layout will be eliminated.
Can anyone confirm that the PasteFromWord function is working for them, and did they need to set any special options in GSEDITOROPTIONS?