Page 1 of 1

Control copy/paste content

Posted: Mon Mar 24, 2025 4:59 pm
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

Re: Control copy/paste content

Posted: Thu Apr 03, 2025 1:03 pm
by Johann
Hello,

any news about this question?

Thanks for your help,

Johann

Re: Control copy/paste content

Posted: Thu Apr 03, 2025 3:47 pm
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

Re: Control copy/paste content

Posted: Fri Apr 04, 2025 9:27 am
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

Re: Control copy/paste content

Posted: Fri Apr 04, 2025 3:03 pm
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

Re: Control copy/paste content

Posted: Mon Apr 07, 2025 9:03 am
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