Issue with toggleUnderline Function in Syncfusion DocumentEditor API

Hi everyone,


I’m currently working with the Syncfusion DocumentEditor API and encountering an issue with the `toggleUnderline()` function. Here’s the situation:


I am trying to use the following function to toggle the underline for selected text:


this.$refs.doceditcontainer.ej2Instances.documentEditor.editor.toggleUnderline();


However, this does not seem to work as intended. In contrast, the `toggleStrikethrough()` function works perfectly:


this.$refs.doceditcontainer.ej2Instances.documentEditor.editor.toggleStrikethrough();


I have triple-checked my implementation and ensured that all API calls are correctly synced with Syncfusion’s documentation. Despite this, `toggleUnderline()` fails to apply the underline formatting to the selected text.


I would appreicate that someone see if they can confirm a working solution.


Is there something I might be missing or an alternative approach I should consider to resolve this issue? Any insights or suggestions would be greatly appreciated!


Thank you!



3 Replies

RT Ragu Thanigasalam Syncfusion Team May 27, 2024 07:00 AM UTC

Hi Harrison,

We have prepared a sample for your reference. Please find a below sample and let us know if the sample meets your requirements.
Sample - https://stackblitz.com/edit/rgnruz-61zeg7?file=src%2FApp.vue

Please refer the UG documentation - https://ej2.syncfusion.com/vue/documentation/document-editor/text-format#underline-property   

Regards,

Ragu T.



HS Harrison Schatz May 27, 2024 11:16 AM UTC

Thank you for the sample. After reviewing your work I noticed my syntax mistake and has been correct. It now works! Thank you!



RT Ragu Thanigasalam Syncfusion Team May 28, 2024 05:08 AM UTC

Harrison,

Thank you for your update.

Please let us know if you need any further assistance.


Regards,
Ragu T.


Loader.
Up arrow icon