I recently download CKEditor for my web application. I want to add copy data from word file and paste on ckeditor, when i am doing this i found that all styling is gone but i want to preserve styling as it is on orignal word file. So i did little search on web and i find that it is possible by changing the value of Change the value of config.pasteFromWordRemoveFontStyles to false. but i dont find where i can change the it. So help me to find where i can change this Change the value of config.pasteFromWordRemoveFontStyles to false.
here are some links from i found some help
http://docs.cksource.com/CKEditor_3.x/Howto/Paste_Font_Styles

Dani AI

Generated

Short answer: set the paste-from-Word options in your CKEditor configuration (either the global config file or per editor instance). As reported, Word paste often loses formatting by default; as pointed out, a proper CKEditor installation exposes a config.js you can edit.

Example — global (in ckeditor/config.js):

CKEDITOR.editorConfig = function( config ) {
  config.pasteFromWordRemoveFontStyles = false;
  config.pasteFromWordRemoveStyles = false;
};

Per-instance (if you load CKEditor from a CDN or prefer inline settings):

CKEDITOR.replace('yourEditorId', {
  pasteFromWordRemoveFontStyles: false,
  pasteFromWordRemoveStyles: false
});

Troubleshooting and practical notes: edit the config.js inside your CKEditor folder (not a different copy), then clear browser cache and reload. If CKEditor was loaded from a CDN or a custom build that omits the paste-from-word plugin, set the options when you create the editor instance or include the plugin (the full/standard builds include it). Also set pasteFromWordRemoveStyles = false if you want non-font inline styles preserved.

Caveats: preserving font styles does not guarantee identical appearance — Word uses non‑web fonts and proprietary markup, and later CKEditor versions (CKEditor 4+) include the Advanced Content Filter which can still strip styles unless you configure allowedContent. If exact visual fidelity is required, consider cleaning the Word HTML server-side or converting to a sanitized, web-friendly stylesheet.

Member Avatar for Member #949455

So i did little search on web and i find that it is possible by changing the value of Change the value of config.pasteFromWordRemoveFontStyles to false. but i dont find where i can change the it. So help me to find where i can change this Change the value of config.pasteFromWordRemoveFontStyles to false.

If you already installed CKEditor correctly then config.pasteFromWordRemoveFontStyles shouldn't be a issue at all.

Read this carefully:

http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.