-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying from Word or other sources #1423
Comments
It's suppose the replace existing editor as far as I know. But I do see your concern about the current workflow, perhaps there will be Word block (in a plugin format if nothing else). May I ask a question out of curiosity without any hidden agenda. Why you and your client are using Word and then pasting the text in current editor? Why writing in Word is better workflow than writing directly in the editor? |
A "paste from Word" block sounds like a very interesting idea. |
I discovered now the "classic text" block, which is taking all the text as I wish for. Yet the toolbar is not working there, and I hope that the TinyMCE will be implemented here exactly as it works now, including the TinyMCE Advanced plugin to style it as one wishes to, and all possible TinyMCE functionality (paste_preprocess etc.). In this way it would be ensured that the ones who simply want to continue business as usual, are not forced to leave the ship. After my first shock, I can say that Gutenberg might be a good step forward, if TinyMCE stays fully implemented as is. In this way, paste from Word is still onboard through TinyMCE as we are used to. |
@samikeijonen: I write directly in WP when I create tutorials about WP and am online anyhow. But any serious article takes long time to develop and I prefer offline software and having things saved on my laptop. |
As far as I know, pasting from Word should result in paragraphs, headings, images, lists and any other content converted into blocks. If all of the text copied from Word presently loses all formatting, then this is simply a bug. |
I can only paste into a block, and there it is processed, in the text block for example pasted as plain text. If I deselect everything and press Ctrl-V, nothing happens. |
How does paste from Word currently work in Gutenberg? I personally don't have Word, so I can't test. It would be great if someone could share some raw pieces of HTML that we receive. I added some logging, so in master or from v0.9 you'll be able to see the received HTML in the console. Particularly the "Received HTML" and "MCE processed HTML" are important. Normally TinyMCE should already do the heavy lifting for Word. |
Also for other sources this raw HTML is valuable of course. |
Hello iseulde, I want to share my ideal vision of the pasting process, and I hope I can continue this experience also after Gutenberg is released. I don't know exactly where to post it, I am a rare visitor in GitHub but want to contribute what I achieved. I wrote an article about it so you can easily have a look and also try out the code: (http://sundari-webdesign.com/wordpress-removing-classes-styles-and-tag-attributes-from-pasted-content/) |
@Sofian777 we've done several improvements to the pasting flow in the last couple releases. I am going to close this one as we have specific issues tracking specific improvements, but feel free to add further comments, or open new issues with the specific needs or bugs. |
@mtias I've tried copy and pasting from MS Word on Mac 2008 and some style information is pasted. |
@fumikito Could you share what's logged in the browser console? |
@iseulde Here you are :)
|
I have a similar issue with Word 2010 on Windows, but all I need to do is delete the first block, the one containing the style definitions. The rest of it comes out OK. I have to manually change some blocks from Text to Quote to get the indentation I want, but that is minor. |
My first experience was a bit shocking. Me and my clients are rarely writing directly in WordPress, but creating text in Word. By using the heading formats, lists, bold, italic etc correctly there, pasting the content into WordPress is easy and it takes everything as it should be. How is this suppossed to work with Gutenberg? It just puts everything as plain text, all formatting gets lost, and needing a "block" everytime I want to create a headline is a completely inefficient workflow. I want all my text in one piece with the abilities to format it, but I cannot see at all how this natural formatting will work in this new idea?
This whole Gutenberg thing will practically ruin WordPress for me. I hope that at least it will always be possible to go for the TinyMCE via plugin for the ones who don't like and want this block things. It's a nice idea for images and widgets, but quotes, headlines etc can not be single blocks. There needs to be a text block that allows text formatting as we are used to. So what is the idea with TinyMCE, should Gutenberg be an alternative people can use, or is it suppossed to replace the existing editor?
Or imagine the often task to copy articles from an old website into a new WP installation. The compatibility with regular HTML formatted text needs to stay intact. For the moment I cannot believe my eyes.
The text was updated successfully, but these errors were encountered: