How to get the content of a Tinymce textarea with JavaScript

I solved it with code: // Get the HTML contents of the currently active editor tinyMCE.activeEditor.getContent(); // Get the raw contents of the currently active editor tinyMCE.activeEditor.getContent({format : ‘raw’}); // Get content of a specific editor: tinyMCE.get(‘content id’).getContent() the activeEditor is current editor,but i use tinyMCE.get(‘editor1’).getContent() can not get the value of my editor, hope … Read more

How to automatic resize tinyMCE?

Nowadays, you should use the autoresize plugin that comes with tinyMCE. You will have to call tinyMCE like this (jQuery version): $(‘.tinymce’).tinymce({ theme : ‘advanced’, plugins : ‘autoresize’, width: ‘100%’, height: 400, autoresize_min_height: 400, autoresize_max_height: 800, }); I made the experience, that it may be helpful to manually call the resizing in the init_instance_callback to … Read more

Why is ValidateInput(False) not working?

With asp.net 4, you’ll need to configure the validation mode in the web.config as well. Set the following as a child of the <system.web> element: <system.Web> … <httpRuntime requestValidationMode=”2.0″/> Asp.Net 4 sets the requestValidationMode to 4.0 by default, which tells the system to perform request validation before the BeginRequst phase of the HTTP request. The … Read more

Getting the value from a TinyMCE textarea

TinyMce has an api for accessing content from the editor. This code will grab the html from the active editor: // Get the HTML contents of the currently active editor tinyMCE.activeEditor.getContent(); // Get the raw contents of the currently active editor tinyMCE.activeEditor.getContent({format : ‘raw’}); // Get content of a specific editor: tinyMCE.get(‘content id’).getContent()

PHP to clean-up pasted Microsoft input

HTML Purifier will create standards compliant markup and filter out many possible attacks (such as XSS). For faster cleanups that don’t require XSS filtering, I use the PECL extension Tidy which is a binding for the Tidy HTML utility. If those don’t help you, I suggest you switch to FCKEditor which has this feature built-in.