Copy content from Word and use paragraph style names as classes Is it possible to copy content from a Microsoft Word document into Drupal and use the name of paragraph styles used in word as class names in the HTML?

I am using:


Drupal 7.34
CKEditor 7.x-1.15+1-dev


If I drag-and-drop content from Word into CKEditor the paragraph styles are used as class names which is good, but unwanted XML comes over from Word too. Example:

&lt;h3&gt;&lt;span lang="EN-AU"&gt;Prefixes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;

&lt;p class="NormalBeforeBullet"&gt;&lt;span lang="EN-AU"&gt;A paragraph here with the normal paragraph style to test that class comes along:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="Bullet" style="margin-left:0cm;text-indent:0cm;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-AU"&gt;&lt;span style="mso-list:Ignore"&gt;•&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-AU"&gt;These are my own bullets&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="Bullet" style="margin-left:0cm;text-indent:0cm;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-AU"&gt;&lt;span style="mso-list:Ignore"&gt;•&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-AU"&gt;To test if the HTML&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:DocumentProperties&gt;
  &lt;o:Version&gt;15.0&lt;/o:Version&gt;
 &lt;/o:DocumentProperties&gt;
&lt;/xml&gt;.... a lot more xml code follows....


If I copy and paste the same content from Word into CKEditor, I get better HTML but no class attributes. Example:

&lt;h3&gt;Prefixes&lt;/h3&gt;

&lt;p&gt;A paragraph here with the normal paragraph style to test that class comes along:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;These are my own bullets&lt;/li&gt;
    &lt;li&gt;To test if the HTML&lt;/li&gt;
    &lt;li&gt;Is created correctly&lt;/li&gt;
&lt;/ul&gt;


CKEditor config options I've tried include


Disabling Advanced Content Filter with config.allowedContent = true;
Adding allowed content filter with config.extraAllowedContent = 'p(mso*,Normal)';
Disabling additional paste filter with config.pasteFilter = null;


None of these options have resulted in clean HTML with paragraph styles as class names.
CKEditor Editor will not work the same way as Word so when you copy and paste some document to CKEditor. CKEditor will change the setting based on it own setting