Reputation: 5122
Using the Word JavaScript APIs, I get the body text using
var body = context.document.body;
context.load(body, 'text');
return context.sync().then(function () {
var myDocBody = body.text;
};
However this does not return bullets within an unordered list, or numbers within an ordered list.
What is the best way to get these within the plain text?
Also is there a way to get tables and formatting? At the moment the tables are returned in the plain text but there is no way to know that they were tables by just looking at the text.
Upvotes: 1
Views: 127
Reputation: 5036
I tried this code and I can get the text from the lists. Not sure if you are aware of this but there is a range.lists and range.tables that you can get access to the lists and tables in the document.
can you please share in what platform you are experiencing this issue? (i.e. Win32, Online, Mac, etc) and please also share build numbers.
Upvotes: 1