Page MenuHomePhabricator

Allow drag and drop of a word processing document on VE
Closed, DeclinedPublic

Description

That question come from several French WikiMOOC students (T117281). Some users create documents on Word, Libre Office, etc. because they prefer to use these tools instead of a page on wiki or because they work offline.

It is currently possible to:

  • drag and drop CSV documents,
  • copy/paste raw text on VE,
  • copy/paste wikitext (rax format) on VE for conversion.

So have a feature to drag and drop simple text documents with a basic markup would be really great.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2016, 12:49 PM
Trizek-WMF updated the task description. (Show Details)Mar 11 2016, 1:24 PM

It's just as easy to copy and paste the document contents - and that already works. Converting a Word doc would require uploading it to the server - running it through LibreOffice conversion libraries etc. Would probably end up being slower to the user.

Trizek-WMF updated the task description. (Show Details)Mar 11 2016, 2:47 PM
Trizek-WMF updated the task description. (Show Details)
Aklapper removed a subscriber: VisualEditor.

Hi @Trizek-WMF. For future reference, please associate at least one project with this task to allow others to find this task when searching in the corresponding project(s). Thanks. (For general information, see How to report a bug.)

Hi @Trizek-WMF. For future reference, please associate at least one project with this task to allow others to find this task when searching in the corresponding project(s). Thanks. (For general information, see How to report a bug.)

I'm pretty sure I did associate the task to VisualEditor project... I may have done something wrong while editing the task.

It's just as easy to copy and paste the document contents - and that already works. Converting a Word doc would require uploading it to the server - running it through LibreOffice conversion libraries etc. Would probably end up being slower to the user.

A user and I have tried to copy and paste documents contents, and it didn't work (only raw text was allowed).

Concerning the conversion, thank you for the precision. If that task is declined, that would be totally understandable :)

I'm pretty sure I did associate the task to VisualEditor project... I may have done something wrong while editing the task.

Actually you subscribed the project.

I'm pretty sure I did associate the task to VisualEditor project... I may have done something wrong while editing the task.

Actually you subscribed the project.

Ahem. >_<
Sorry.

It's just as easy to copy and paste the document contents - and that already works. Converting a Word doc would require uploading it to the server - running it through LibreOffice conversion libraries etc. Would probably end up being slower to the user.

A user and I have tried to copy and paste documents contents, and it didn't work (only raw text was allowed).

Can you provide an example document which failed? Note that links are still stripped deliberately (T129546) but other allowed formatting is kept (headings/bold/italic/tables etc.)

We both tried with that document:

This works for me pasting from LibreOffice. Which office software and version are you using? Also can you paste into the right hand box here: http://edg2s.github.io/content-editable-sandbox/ and then provide the raw HTML here.

Esanders added a comment.EditedMar 13 2016, 10:59 AM

Also works fine in Windows 10 + Office 2016 + Chrome/Firefox/Edge.

NB there is a known bug if you select all and paste over an existing document in Chrome where some content is dropped.

I just copy-pasted the content on the ghitub form. I have these results on Xubuntu 14.04 LTS, from Libre Office Writer 4.2.8.2 :

  • Chromium: Importer depuis un traitement de texte ? Voyons, voyons… De l'italique. Un retour ligne. Un nouveau paragraphe. Une liste : 1. item 1 2. item 2 Une section
  • Firefox: Importer depuis un traitement de texte ? Voyons, voyons… De l'italique. Un retour ligne. Un nouveau paragraphe. Une liste : 1. item 1 2. item 2 Une section

Nothing has been formatted.

I've tried it on a sub page on Firefox, with my volunteer account:


And when saved, I have a strange result.

Paste the rich text into the right hand side of the github sandbox, then paste the raw HTML it generates here (i.e. the text in the left hand box).

LO5 + Ubuntu + Chrome/Firefox:

Esanders triaged this task as Lowest priority.Mar 16 2016, 4:38 PM
Trizek-WMF added a comment.EditedMar 17 2016, 10:00 AM

<ol>

		<li><h2 class="western">Importer depuis un traitement de texte&nbsp;?</h2>

</li>
</ol>
<p class="western">Voyons, voyons… De l'<i>italique</i>.<br>Un
retour ligne.</p>
<p class="western">Un nouveau paragraphe.</p>
<p class="western">Une liste&nbsp;:</p>
<ol>
<li><p class="western">item 1</p>
</li><li><p class="western">item 2</p>
</li></ol>
<ol>

			<li><h3 class="western">Une section</h3>
		</li>

</ol>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><br>
</p>

For whatever reason your word processor is wrapping the headings in a numbered list when exporting (<ol>). I've not seen this before and I don't think it is something we can reasonably work around. If the word processor says there is a numbered list we have to assume there is a numbered list.

That's probably the same for the user who originally reported that. It will not be really simple to explain if it depends on the word processor without a way to identify that.
We should just update documentation about that, I'll ask @Whatamidoing-WMF about it.

Task closed?

Jdforrester-WMF closed this task as Declined.Apr 3 2016, 7:12 AM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Sure.