Skip to content

Conversation

@Amnesthesia
Copy link

We use SyncFusion Document Editor to edit documents and perform MailMerge operations, which we process on our backend with Sablon.

Occasionally, we have errors thrown when users have put mergefields on the same line as another merge field, particularly if those mergefields insert WordML such as tables or images.

This seems to happen because Sablon::Content::WordML removes the parent, expecting only one WordML variable per parent paragraph.

I made a ticket on this but thought I'd try to to be helpful and propose a fix, which is to insert a new paragraph as the previous sibling to the existing paragraph, then replace that paragraph with the variable instead, ensuring that it never removes a paragraph unless the mergefield is the last mergefield of that paragraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant