Not able to add tags for strikethrough and delete

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
shilpa
Posts: 68
Joined: Mon Jul 04, 2022 8:42 am

Not able to add tags for strikethrough and delete

Post by shilpa »

Hi Oxygen Team,

I have registered two custom icons Strikethrough and Delete in oxygen web author plugin.
image.png
image.png (567 Bytes) Viewed 433 times
image.png
image.png (549 Bytes) Viewed 433 times
and in the actionPerformed i have added below respectively

actionPerformed(callback) {
jaEditor.getActionsManager().invokeOperation('ro.sync.ecss.extensions.commons.operations.ToggleSurroundWithElementOperation', {
element: '<deleted.material style="percent_op" xmlns="http://www.thomsonreuters.com/legal/jud ... d.material>'
});
callback();
}

actionPerformed(callback) {
jaEditor.getActionsManager().invokeOperation('ro.sync.ecss.extensions.commons.operations.ToggleSurroundWithElementOperation', {
element: '<strikethru xmlns="http://www.thomsonreuters.com/legal/jud ... strikethru>'
});
callback();
}
when i select text and click on icon text is not wrapping with the elements which is defined for the icons.

Please let me is there anything i have missed.

Thanks & Regards
Shilpa.P
mihaela
Posts: 500
Joined: Wed May 20, 2009 2:40 pm

Re: Not able to add tags for strikethrough and delete

Post by mihaela »

Hello,

in your code the value of the "element " parameter is not a valid XML element fragment (it has only the stat tag of the element included). You have to close the element or add the end element tag.
Also, the callback can be given as parameter of invokeOperation call:
https://www.oxygenxml.com/maven/com/oxy ... on__anchor

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
shilpa
Posts: 68
Joined: Mon Jul 04, 2022 8:42 am

Re: Not able to add tags for strikethrough and delete

Post by shilpa »

Thank You Mihaela!!

Now it's working but i am getting some other issue
In case of deleted.text element the text is striking as you can see in the image.
image.png
image.png (3.59 KiB) Viewed 399 times
In case of strikethru and deleted.material element the text is not getting strike below are the images for reference
image.png
image.png (2.39 KiB) Viewed 399 times
image.png
image.png (3.66 KiB) Viewed 399 times
may i know how to make strike to text using above two elements.
Please do the needful.

Thanks in advance!
Shilpa.P
cosminef
Site Admin
Posts: 176
Joined: Wed Aug 30, 2023 2:33 pm

Re: Not able to add tags for strikethrough and delete

Post by cosminef »

Hello,

This can be achieved with CSS. We recommend using the CSS inspector function in Web Author so you can see how the <deleted.text> element is styled.
CSS-inspector.png
CSS-inspector.png (155.4 KiB) Viewed 392 times
Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
Post Reply