Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How can I fixed the font output (e.g. Arial) of the text editor so that it ignore what was pasted in the editor?

0 votes
1,374 views
asked Apr 24, 2011 in Q2A Core by anonymous
When a user copy and past something on the web into the text editor, it copy the formats as well, i.e. different font and font-size. How can I ensure the font output are the same for all entries without having the user changing that in the editor by themselves?

2 Answers

+2 votes
answered Apr 25, 2011 by case42

if I understand the question right.. there may be an option in the editor?.. 

Link on Ckeditor docs site

 

ForcePasteAsPlainText

Setting it to true forces the editor to discard all formatting when pasting text. It will also disable the Paste from Word operation. 


Example:

FCKConfig.ForcePasteAsPlainText = true ;

By default the option is set to false.

+1 vote
answered Aug 3, 2011 by Jura

Using the answer from Case42 (Thanks Case!), paste the following in the config.js file in the wysiwyg folder:

CKEDITOR.editorConfig = function( config )
{
    config.forcePasteAsPlainText = 'true';
};

Works here with Q2A 1.4.1.

...