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);

Wysiwyg editor for angular4 [closed]

Since I had the same problem, I’m sharing the results of my research here: ng2-ckeditor demo here ngx-editor demo here quill.js for angular demo here Note: Quill uses JSON to store the data internally, not html. PRIME NG Theme collection, that features a Quill-based WYSIWYG-editor as well, demo here. Some of themes are free. ngx-md … Read more

Get caret (cursor) position in contentEditable area containing HTML content

UPDATE I’ve written a simpler version of this that also works in IE < 9: https://stackoverflow.com/a/4812022/96100 Old Answer This is actually a more useful result than a character offset within the text of the whole document: the startOffset property of a DOM Range (which is what window.getSelection().getRangeAt() returns) is an offset relative to its startContainer … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)