How do I remove tinyMCE and then re-add it?

To cleanly remove an editor instance and avoid any errors use: tinymce.EditorManager.execCommand(‘mceRemoveControl’,true, editor_id); To reinitialize the instance use: tinymce.EditorManager.execCommand(‘mceAddControl’,true, editor_id); Be aware that when moving TinyMCE editors in the DOM you need to removeControl and addControl too, otherwise it results in JS errors. As of TinyMCE 4 the methods to remove and reinitialize an instance … Read more

Is there any good IDE or WYSIWYG editor for graphviz? [closed]

The current version of Graphviz.app does not contain the “external editor” button shown in rampion’s screenshot above – Or the Render/Stop buttons, and it has replaced the “settings” button with “attributes”. However, it can be used as described. I downloaded ‘graphviz-2.27.20101110.0545.pkg’ from http://graphviz.org/Download_macos.php. Note that there are several places to download various things which call … Read more

TinyMCE Paste As Plain Text

This is what i do to get paste plain text. 1. paste_preprocess setting (in tinymce init) paste_preprocess : function(pl, o) { //example: keep bold,italic,underline and paragraphs //o.content = strip_tags( o.content,'<b><u><i><p>’ ); // remove all tags => plain text o.content = strip_tags( o.content,” ); }, 2. function strip_tags (on the main document) // Strips HTML and … Read more

Wysiwyg with image copy/paste [closed]

You might find inspiration from ScreenshotMe. Basically you need different parts: something that takes the image out of the clipboard and uploads it to the web: this could be a java applet, flash or firefox extensions. Flash or Java would have the advantage of being cross browser then you use the <canvas> tag to display … Read more

What are all the possible settings attributes in TinyMCE’s addButton() function?

autofocus: True if the control should be focused when rendered border: Border box values example: 1 1 1 1 classes: Space separated list of classes to add disabled: Is the control disabled by default hidden: Is the control hidden by default icon: Icon to use for button image: Image to use for icon margin: Margin … Read more

Any WYSIWYG rich text editor that doesn’t use HTML (contenteditable or designMode), a la (the new) Google Docs? [closed]

You could start with the Ace editor (formerly Bespin and Skywriter). It’s aimed at code editing, so it’s missing formatting and other features, but you may find a useful core of functionality to base a rich text editor on. In action: http://ajaxorg.github.com/ace/build/editor.html Code: https://github.com/ajaxorg/ace Update: As @theazureshadow points out, the current editor doesn’t use canvas … Read more

make readonly/disable tinymce textarea

Use the configuration parameter readonly tinyMCE.init({ … theme : “advanced”, readonly : 1 }); Here is a link to a demo. Update: What you can do to prevent users from editing content in your editor is to set the contenteditable attribute of the editors iframe body to false: tinymce.activeEditor.getBody().setAttribute(‘contenteditable’, false);