Control copy/paste content

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Johann
Posts: 240
Joined: Wed Jun 17, 2015 12:46 pm

Control copy/paste content

Post by Johann »

Hello Oxygen,

We are using Oxygen Web Author 27.0 version.

We want to control how content copied from an external application (word, pdf...) is inserted after pasting into the Web Author editor.
Currently, the behavior we have is that copied content is pasted into the closest valid location.

Is it possible that, when pasting into an invalid location, the user will receive a notification indicating that the content cannot be pasted into the desired location, and that no insertion is performed?

Thanks for your help,

Johann
Johann
Posts: 240
Joined: Wed Jun 17, 2015 12:46 pm

Re: Control copy/paste content

Post by Johann »

Hello,

any news about this question?

Thanks for your help,

Johann
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: Control copy/paste content

Post by cosminef »

Hello,

We apologize for not responding to this topic.
Recently, we had difficulties receiving emails, and the notification regarding this post probably didn’t arrive on time.
We will review your use case and get back to you with details.

Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: Control copy/paste content

Post by cosminef »

Hello,

To implement the use case you described, you need to add the following entries to the options.xml [1] file in Web Author:

Code: Select all

<entry>
			<String>author.editing.mode</String>
			<authorSchemaAwareOptions>
				<field name="isVerifyDeleteElementTagsAction">
					<Boolean>true</Boolean>
				</field>
				<field name="enableSmartDelete">
					<Boolean>true</Boolean>
				</field>
				<field name="isVerifyPasteAndDNDAction">
					<Boolean>true</Boolean>
				</field>
				<field name="enableSmartPaste">
					<Boolean>false</Boolean>
				</field>
				<field name="isVerifyTypingAction">
					<Boolean>true</Boolean>
				</field>
				<field name="enableSmartTyping">
					<Boolean>true</Boolean>
				</field>
				<field name="insertOnlyElemensFromCCList">
					<Boolean>true</Boolean>
				</field>
				<field name="insertOnlyAttributeValuesFromCCList">
					<Boolean>true</Boolean>
				</field>
				<field name="showAllPossibleElementsInCCList">
					<Boolean>true</Boolean>
				</field>
				<field name="isVerifyJoinAction">
					<Boolean>true</Boolean>
				</field>
				<field name="schemaAwareEditingMode">
					<String>schema_aware_editing_custom</String>
				</field>
				<field name="isVerifyUnwrapAction">
					<Boolean>true</Boolean>
				</field>
				<field name="showAvailableCCItemsOnEnter">
					<Boolean>true</Boolean>
				</field>
			</authorSchemaAwareOptions>
		</entry>
A restart of the Web Author server is required for the changes to take effect. Please let us know if this is the expected behavior.

Best,
Cosmin

[1] https://www.oxygenxml.com/doc/versions/ ... tions.html
Cosmin Eftenie
www.oxygenxml.com
Johann
Posts: 240
Joined: Wed Jun 17, 2015 12:46 pm

Re: Control copy/paste content

Post by Johann »

Hello,

Thank you fr the response.

Unfortunately, this didn't correspond to my expectations.

Indeed, when I paste the content, I get a “yellow notification” saying (in French): "Pour permettre cette opération, désactiver l'option 'Rejeter l'action lorsque son résultat est invalide' pour l'action 'Copier et glisser-déposer' and the "raw" content with styles is pasted anyway.

Example of raw content after pasting:

Code: Select all

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss;...

Regards,

Johann
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: Control copy/paste content

Post by cosminef »

Hello,

Could you let us know what type of document you're pasting into?
Also, could you provide a sample you're testing with and the steps to reproduce the issue?

Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
Post Reply