If a content control's title text is too long the text is truncated. How can I wrap this text? This needs to work in both WordOnline and MSWord (desktop version)
I'm using office.js to insert the content control, similar to this:
const contentControl = searchResults.items[0].insertContentControl();
contentControl.removeWhenEdited = false;
contentControl.cannotDelete = false;
contentControl.title = 'Low Risk: Assignment & Change of Control (Assignment Addressed) - Score=0.84';
contentControl.tag = '00001';
contentControl.appearance = 'BoundingBox';
contentControl.color = '#33cc33';
As you can see from the screenshot below, MSWord is truncating the title text:
If I inspect the css for the content control (.ContentControlAcetateTitleButton css class) I can see that the problem is with the height, which is fixed to 17px. If this height was removed the text would wrap properly... or at least it would in WordOnline; unlikely to work for MSWord (desktop) I suppose
Unfortunately there is no direct API to wrap CC title text. Even on word UI, there is no way to do this. You can post your feedback/request/suggestion to Word team through "Give Feedback to Microsoft" on the right down corner on wordonline or clicking the smile emoji on the right top corner on word desktop