· Sep 9, 2016 2m read

fixing repetitive problems after pasting content from Word or other sources into a Developer Community article

as described in How to post an article from Word or Google Docs, you can use the Paste from Word button to paste content you have copied from a Word or Google Docs document into a Developer Community post.

this worked well for me pasting from Word 10 documents, and retained most (though not all) of my Word formatting. i did have one problem, however, and wanted to pass on my workaround.

if there are external links in the Word document, they sometimes don’t work when pasted in until you manually add http:// or https://, which can get stripped (don't know if this applies to Google Docs). this can also happen when you change the target (for example to New Window). if you have a lot of links to fix, or just want to change a lot of them in some repeated way (like adding target="_blank"), you can do it fairly easily using the following steps:

  1. paste from Word
  2. save the post
  3. return to Edit tab and change to change Text format drop-down to Plain text editor
  4. select all and paste to an editor like notepad that has a good search and replace function. (note that some text editors may treat the content as one long line, which is awkward. notepad limits line length so does not do this.)
  5. do a global search and replace for the missing http://, to add target="_blank", or to make any other repetitive changes
  6. select all and copy and paste back to Community plain text editor
  7. save the post and continue, switching back to WYSIWYG editor if desired.

this approach can be used for any global changes you need to make after a paste from Word or elsewhere.

Discussion (0)0
Log in or sign up to continue