Want to know if there is strike through button in docx editor which can be enabled

WebViewer Version: 11.8

Please give a brief summary of your issue:

I’m trying to add the prebuilt strike through button to the editor toolbar , but i’m unable to do it.

Please describe your issue and provide steps to reproduce it:
I tried to add the prebuilt strike through button to the editor toolbar , but i’m unable to do it. kindly help

Please provide a link to a minimal sample where the issue is reproducible:

WebViewer({
path: ‘../../lib/webviewer’,
licenseKey: ‘demo:1762537218156:600204bf0300000000d8faf0485c96f3f7a22f1b8c3b87745debbab84e’,
initialDoc: ‘/assets/OfficeOutput.docx’,
fullAPI: true,
enableOfficeEditing: true,
officeEditorOptions: {
initialEditMode: ‘editing’
},
disabledElements: [
‘dropdown-item-toolbarGroup-oe-Layout’,
‘editorModeAndSearch’,
‘toolbarGroup-oe-Layout’
]
}, this.viewer.nativeElement).then(instance => {
const base64String = this.BASE64VAL;

  // Convert base64 to Uint8Array
  const byteCharacters = atob(base64String);
  const byteNumbers = new Array(byteCharacters.length);
  for (let i = 0; i < byteCharacters.length; i++) {
    byteNumbers[i] = byteCharacters.charCodeAt(i);
  }
  const byteArray = new Uint8Array(byteNumbers);

  const blob = new Blob([byteArray], {
    type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  });
  // Load the document
  instance.UI.loadDocument(blob, { filename: 'OfficeOutput.docx' });

  instance.UI.enableElements([
    'officeEditorHomeTab',
    'officeEditorHomeGroupedItems',
    'strikeoutButton'
  ]);

  instance.UI.setToolbarGroup('officeEditorHomeGroupedItems');

}).catch((err) => {
  console.log("err", err);
})
1 Like

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


It seems like you’re trying to add a strikethrough button to the DOCX editor toolbar in WebViewer version 11.8. However, it appears that you are using an incorrect element name for the strikethrough button. In the DOCX editor, toolbar elements might not directly correspond to the names used in other parts of the WebViewer UI.

Some things you can try:

  • Verify the exact name of the button element you want to enable. It might not be ‘strikeoutButton’.

  • Use the WebViewer’s UI customization tools to inspect and determine the correct button name.

  • Ensure that the ‘officeEditorHomeTab’ is enabled, as it’s required for editing features to be accessible.

  • Check if there are any dependencies or other elements that need to be enabled alongside the strikethrough button.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

1 Like