tinymce

TinyMCE: disable automatic adding tags

坚强是说给别人听的谎言 提交于 2019-12-11 03:38:49
问题 I use TinyMCE in my script to edit header and footer templates. But TinyMCE automatic add tags to close them, what I don't want. for example: the end of my header </nav> <!--end menu--> <!--end header--></header> TinyMCE makes it </nav> <!--end menu--> <!--end header--></header></div></div> How can I disable that? I already tried verify_html : false, verify_css_classes : true, cleanup : false, cleanup_on_startup : false, 回答1: Try tinyMCE.init({ ... verify_html : false, verify_css_classes :

Create and register TinyMCE plugin with jQuery

梦想的初衷 提交于 2019-12-11 03:33:23
问题 Using the jQuery TinyMCE, I'm trying to register a custom "plugin" (it's really just a menu within the toolbar) I'm trying to get this registered, but the code I found on http://www.tinymce.com/tryit/menu_button.php doesn't seem to work with the jquery version of TinyMCE. Ideally, I'd like to have my custom plugin code in a separate js file also. TinyMce init script // Start TinyMce Editor $('#Template_Html').tinymce({ // Location of TinyMCE script script_url: '@Url.Content("~/Scripts/tinymce

Obtaining the “default” mockup TinyMCE configuration on Plone 5

谁说我不能喝 提交于 2019-12-11 03:33:17
问题 I'm trying to configure TinyMCE inside Plone 5 template (so: not the z3c.form widget type). Using the TinyMCE Mockup patter you quickly learn how to display a rudimentary TinyMCE configuration (without any i18n support). But how I can get the "default" configuration applied to TinyMCE when it's loaded for default content types like a Plone page? What I'm looking for a way to get the right value for the data-pat-tinymce HTML attribute. 回答1: I think what you're asking for is to do something

Drop-down menu/ComboBox/listbox in TinyMce 4?

限于喜欢 提交于 2019-12-11 03:26:12
问题 After doing some research in google for pretty long time found some info on Drop down menu , but the documentation doesn't have clear information for me to understand, or other docs are mostly on TinyMce3 . I've customized TinyMce 4 adding a button, menu and sub-menus and have used Window Manager with text box and radio button (which is a checkbox , poor efforts I know), but I need a drop down list/listbox in Window Manager edit : Radio buttons are not supported in tinymce4 回答1: this helped a

TinyMCE scrubbing HTML in Umbraco

人盡茶涼 提交于 2019-12-11 03:25:20
问题 I'm trying to use Bootstrap's collapse functionality in Umbraco, but when I edit the HTML of a page in the rich text editor (TinyMCE), the data- attributes are scrubbed when I save the page so the plugin doesn't work. I've followed Allow any markup in the tinymce editor with no effect. Can I stop TinyMCE scrubbing my HTML? EDIT: I've reproduced the problem at http://fiddle.tinymce.com/BNcaab Try pasting the code below into the HTML editor, then saving and clickig the HTML editor again. <a

Tinymce get content

大憨熊 提交于 2019-12-11 03:19:26
问题 I try to get the content of tinymce, like this: var hallo = tinyMCE.activeEditor.getContent(); alert(hallo); but every time I get this message: Uncaught TypeError: Cannot read property 'getContent' of null I am using tinymce 4. Thank you 回答1: Cannot read property 'getContent' of null often means that TinyMCE is unable to find your textbox which means there is something wrong in the reference to textarea's class . <form method="post" action="somepage"> <textarea id="myTextArea" class=

How to disable HTML tags from tinyMCE

半腔热情 提交于 2019-12-11 03:14:01
问题 https://www.dropbox.com/s/g2nry5ifx0x9v52/2013-12-20%2011_20_26-Ingage%20Admin%20Panel.png Hello i want to not saw the strong>>em from my tinyMce. Knows anyone how to do it? Check out the photo to understand what i want! 回答1: You can hide the bottom toolbar using this tinymce config parameter: statusbar : false, 回答2: If you are using wordpress install this plugin http://wordpress.org/plugins/tinymce-advanced/ This plugin will help to customize the tinyMCE Editor. Otherwise you can set "valid

Django-TinyMCE with Multiple Forms

删除回忆录丶 提交于 2019-12-11 02:34:21
问题 I'm trying to create a single HTML page with multiple instances of TinyMCE editors. The number of editors varies by the request; so I can't enumerate them and initialize them individually. Here is my code: views.py: from tinymce.widgets import TinyMCE class ThreadForm(forms.Form): subject = forms.CharField(max_length=300, widget=forms.TextInput(attrs={'size':'100'})) body = forms.CharField(widget=TinyMCE()) class MessageForm(forms.Form): thread_pk = forms.IntegerField() body = forms.CharField

Get cursor position or number of line on which the cursor is in TinyMCE

偶尔善良 提交于 2019-12-11 02:24:31
问题 How to get the cursor position in TinyMCE or the number of line on which the cursor is in TinyMCE? 回答1: Here is the part of a function from one of my own plugins i use to get the actual line number: var ed = tinymce.get('my_editor_id'); var bm = ed.selection.getBookmark(); var $marker = $(ed.getBody()).find('#'+bm.id); var elem = ed.getDoc().getElementById(bm.id+'_start'); try { box = elem.getBoundingClientRect(); } catch(e) { // should not happen console.log('error creating box: ' + e); }

TinyMCE: Live copy text from TinyMCE to regular text field

时光总嘲笑我的痴心妄想 提交于 2019-12-11 02:16:42
问题 something I've been struggling with here for hours now. We use tinyMCE on the back end for one of our consumer systems and the powers that be have dictated that they want the ability for whatever text the user types in to the TinyMCE editor to be mirrored over to a regular text field (with no html mark up inside). The idea here is to have one field for HTML mail content (TinyMCE) and one for simple plaintext mail (regular textarea). So when the user types in their email content inside TinyMCE