SlidesCodeHighlighter icon indicating copy to clipboard operation
SlidesCodeHighlighter copied to clipboard

Support for Microsoft Office PowerPoint

Open doggy8088 opened this issue 2 years ago • 2 comments

The SlidesCodeHighlighter is not able to paste code with the right format into PowerPoint correctly.

When I paste code into it, it will become only 1 line.

image

It because PowerPoint can't treat <pre> tag correctly.

I have workaround for this. I learned from Visual Studio Code.

  1. Replace \n as <br>
  2. Replace all the spaces as &#160;.
  3. Wrap each line in the <div> ( don't use <pre> )

doggy8088 avatar Nov 11 '23 14:11 doggy8088

Another workaround: Paste to Word first, and from there to PowerPoint. You will probably need to reset line spacing, but otherwise it works.

mcejp avatar Jan 22 '24 13:01 mcejp