topcoder-platform / forums

0 stars 0 forks source link

[$30] Formatting Issue in Forum Post editor window #568

Closed m-yadav closed 3 years ago

m-yadav commented 3 years ago

In Vanilla forums , while posting a reply or initiating a thread , if we paste any string with the underscores, and then select the entire string and press on the italic button, the underscores vanish in the preview or the actual post. Ideally the underscore should be preserved while clicking on the italic button.

Supporting Screenshots

Before : image

image

After selecting the text and clicking on Italic Button

image image

jmgasper commented 3 years ago

@m-yadav - Can you let me know exactly what browser and OS you are testing please?

sdgun commented 3 years ago

@jmgasper I checked this, it's not browser specific.

jmgasper commented 3 years ago

Challenge https://www.topcoder.com/challenges/4ca3ed16-a6bc-43c4-a234-d6732ab830c1 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

jmgasper commented 3 years ago

Challenge https://www.topcoder.com/challenges/4ca3ed16-a6bc-43c4-a234-d6732ab830c1 has been assigned to obog.

This is an automated message for ghostar via Topcoder X

jmgasper commented 3 years ago

@atelomycterus - This one can be lower priority, thanks.

atelomycterus commented 3 years ago

@jmgasper This formatting issue is due to using two special chars (* and _ ) for italic in EasyMDE . If the selection contains * or _ then they are removed, and the text is wrapped with *.

During debugging I found out the same formatting issue with bold. If we paste any string with the 2 underscores, and then select the entire string and press on the bold button, the underscores vanish in the editor. EasyMDE uses ** and __ for bold.

To keep the underscores in text we can use * for italic, ** for bold. Let me know if you are ok. I'll customize bold/italic actions.

Before formatting lines: image

Select text and press on the Italic button. The special chars are removed from the selection and the text is wrapped with '*'. image

Before formatting: image

Select text and press on the Bold button. image

atelomycterus commented 3 years ago

@jmgasper I've customized bold/italic actions (☝️ ). Use * for italic, ** for bold. Please apply PR: https://github.com/topcoder-platform/forums-topcoder-editor-plugin/pull/25. Thanks!

Testing

image

image

jmgasper commented 3 years ago

Payment task has been updated: https://www.topcoder.com/challenges/4ca3ed16-a6bc-43c4-a234-d6732ab830c1 Payments Complete Winner: obog Copilot: ghostar Challenge 4ca3ed16-a6bc-43c4-a234-d6732ab830c1 has been paid and closed.

This is an automated message for ghostar via Topcoder X

sdgun commented 3 years ago

Verified in Dev.

image

sdgun commented 3 years ago

Verified in production.

image