1
I would like to know if there is a plugin or something similar (macro? don't know) what will apply MS Word styles on-the-fly after pasting some text into the document. Current MS Word's way of preserving styles is not an option (or maybe I can't use it). From what I've tested when I paste some kind of simple HTML
ex.
<h1>Heading</h1>
<h2>Header 2</h2>
<p>Paragraph 1 bla bla</p>
<p>Alalalalala</p>
<pre>This is code</pre>
Ms Word will just apply hardcoded styles directly from HTML. And I would like to apply defined styles. Generally I'm expecting some kind of mapping
h1 => MS Word Header 1
h2 => MS Word Header 2
p => MS Word Normal Text
pre => MS Word Code Style (custom or something like that)
I would like to paste HTML (or Markdown in next stages) and run some kind of plugin/parser, which will do the mapping and apply the styles automagically.
ex.
<h1 class="header-1">Header 1</h1>
<p class="special-style">This is paragraph with a special style</p>
This should be mapped to "MS Word Header 1" and "Special style".
Anyone's done something like that? Or can give me a hints how to write an extension for MS Word to do that? Is there any way to:
- Get current cursor position
- Grap text from the clipboard
- Process/apply styles
- Append it in current cursor position
It doesn't have to be CTRL+V, I can do CTRL+C on a HTML source code and paste it with some other shortcut :)