Skip to content

context.document.body.text differs depending on platform #5286

Open
@pdoyon-Druide

Description

context.document.body.text does not always return the text displayed in the document with Word Online.

Your Environment

  • Platform : Office on the web
  • Host : Word
  • Office version number: Word online
  • Operating System: Window 10
  • Browser : Google Chrome

Expected behavior

The output of the “context.document.body.text” function should remain consistent across all platforms. At present, it displays the text visible in the document’s preview on both Windows and Mac computers. However, this behaviour does not necessarily hold true for Word Online.

Current behavior

When the "Simple Markup" option is selected in Word Online for displaying "Simple Markup" (Review > Markup View > Markup in margin), the deleted text appears in the "context.document.body.text" property , but it is not displayed in Word's document view.

Steps to reproduce

  1. Open a new document in Word online
  2. Add text : I eat an apples
  3. Enable change tracking -> Review > Track Changes > Just Mine
  4. Delete the 's' character at the end of the word "apples"
  5. Show marks in the margin -> Review > Markup view > Markup in margin (Simple Markup)
  6. Get the text with context.document.body.text

The result is -> I eat an apples.

Context

Our plug-in depends on the “context.document.body.text” method to search for text in a document. Unfortunately, this functionality does not work with Word Online when the “Simple Markup” option is enabled.

Metadata

Labels

Area: WordIssue related to Word add-insNeeds: attention 👋Waiting on Microsoft to provide feedback

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions