studio icon indicating copy to clipboard operation
studio copied to clipboard

Better support for copy-paste from Microsoft Word

Open bjester opened this issue 2 years ago • 6 comments

Observed behavior

From PEAS, either pasting by default or as plain text from MS Word into the exercise editor doesn't always produce helpful results.

Expected behavior

It would be nice if the editor supported pasting the same formatting that it itself supports. So a user pastes bold, italic, or lists, the exercise editor sanitizes the input and reproduces the formatting as much as possible.

User-facing consequences

Challenges in organizing exercise content and inputting it into the exercise editor on Studio

bjester avatar Nov 03 '23 16:11 bjester

Related: https://github.com/learningequality/studio/issues/4328

bjester avatar Nov 03 '23 18:11 bjester

Should be 💯 safely closed with the new editor implemented!

habibayman avatar Sep 25 '25 01:09 habibayman

I think we'll flag this one for QA rereview to try out some different variations!

rtibbles avatar Sep 25 '25 01:09 rtibbles

This is currently live on unstable for testing.

rtibbles avatar Sep 25 '25 01:09 rtibbles

@radinamatic, since you have some familiarity already with Habiba's work, can this go on your to-do list? We think this should be resolved in the scope of Habiba's work, but some testing with actual MSword docs copy and pasted into the updated rich text editor on unstable would be the final 👍 we need to close this out

marcellamaki avatar Sep 30 '25 14:09 marcellamaki

Apologies for the delay, it occurred to me that it would be beneficial to try pasting from other document editors (like LibreOffice Writer or Google Docs) that Kolibri Studio users may employ while building exercises, as well as review how the exercise questions and answers are displayed in Kolibri.

Channel used for testing has the vomur-labid token, and the same sample text has been pasted as plain text in each editor where its native functions were used to add formatting (headings , bold, italic, underline, strike-through, subscript, superscript, and nested lists) prior to pasting it back to rich text editor on Studio unstable.

Sample testing docs:

Paste from MS Word

Issues with questions on Studio (after pasting)

  • weird looking list bullets (too small or too big)
  • nested list looses the proper indentation

Issues with questions in Kolibri

  • underlined, superscript and subscript formats are not properly displayed (text is enclosed between <u>, <sup> and <sub> tags)
  • nested list looses the proper indentation (same as on Studio)

Issues with answers on Studio (after pasting)

(same as for questions)

Issues with answers in Kolibri

  • semantics for headings is preserved, but they loose the spacing
  • line endings are lost (it looks like one paragraph)
  • underlined, superscript and subscript formats are lost (same as on Studio)

In the screenshots Studio is on the left, Kolibri on the right.

Question Answer
Image Image

Paste from LibreOffice Writer

Issues with questions on Studio (after pasting)

None 🎉

Issues with questions in Kolibri

  • underlined, superscript and subscript formats are not properly displayed (text is enclosed between <u>, <sup> and <sub> tags)

Issues with answers on Studio (after pasting)

None 🎉

Issues with answers in Kolibri

  • semantics for headings is preserved, but they loose the spacing
  • only one line ending is lost (special characters at the end)
  • underlined, superscript and subscript formats are lost (same as on Studio)

In the screenshots Studio is on the left, Kolibri on the right.

Question Answer
Image Image

Paste from Google Doc

Issues with questions on Studio (after pasting)

  • strike-through formatting of the last item in the first list extends to its whole nested list

Issues with questions in Kolibri

  • underlined, superscript and subscript formats are not properly displayed (text is enclosed between <u>, <sup> and <sub> tags)
  • strike-through formatting of the last item in the first list extends to its nested list (same as on Studio)

Issues with answers on Studio (after pasting)

(same as for questions)

Issues with answers in Kolibri

  • semantics for headings is preserved, but they loose the spacing
  • only one line ending is lost (special characters at the end)
  • underlined, superscript and subscript formats are lost (same as on Studio)
  • strike-through formatting of the last item in the first list extends to its nested list (same as on Studio)

In the screenshots Studio is on the left, Kolibri on the right.

Question Answer
Image Image

I'm not saying all of these issues need to be fixed before we release Q4 patch, and would suggest we prioritize fixes in this order:

  1. lost line endings
  2. improper display of <u>, <sup> and <sub>
  3. spacing of the headings
  4. nested list indentation
  5. bullets styling

radinamatic avatar Oct 08 '25 21:10 radinamatic