tinymce

multiple tinymce textareas

╄→尐↘猪︶ㄣ 提交于 2019-12-21 03:32:38
问题 I use tinymce for a webpage that dynamically generates at least 5 texts. The configuration I use only works on the first textarea unfortunately. tinyMCE.init({ height : "300", mode : "exact", elements : "content", theme : "simple", editor_selector : "mceEditor", ... <textarea class="mceEditor" name="content" rows="15" cols="40">content</textarea> What's the configuration to enable tinymce editing in all textarea 's. 回答1: If you're using "exact" mode you'll need to specify the ids of the

ASP.NET MVC 3 unobtrusive validation, submit and TinyMCE

两盒软妹~` 提交于 2019-12-20 20:46:20
问题 We have an in-house developed file/image/document manager plugin for TinyMCE that is still being ported over to jQuery. In the mean time, some of our projects that rely on having these features need to use the Prototype-based version of TinyMCE & jQuery.noConflict(). This works fine however with unobtrusive validation in ASP.NET MVC 3 the validation on submit happens before the TinyMCE callback to copy the TinyMCE'ed contents to the form field is triggered. Is it possible to hook into a pre

Restrict keyboard shortcuts in TinyMCE editor

霸气de小男生 提交于 2019-12-20 20:00:53
问题 Trying to find where to disable individual keyboard shortcuts in the jQuery version of TinyMCE editor. Currently the list of allowable shortcuts is: ctrl+z Undo ctrl+y Redo ctrl+b Bold ctrl+i Italic ctrl+u Underline ctrl + 1-6 h1-h6 ctrl+7 p ctrl+8 div ctrl+9 address Currently looking to disable all shortcuts but Undo, Redo and bold. The rest are unnessary in our implementation due to it's unwanted formatting. I can't seem to find the code that enables these shortcuts. Can you point out where

How to fill tinymce-rails editor with capybara and selenium?

佐手、 提交于 2019-12-20 18:45:12
问题 I have trouble with using capybara to test tinymce form. I'm using tinymce-rails and have 7 editors in my form. Also I'm using asciimath plugin with tinymce. Everything works fine, but I'm unable to write tests to fill in tinymce editor. Here is how my step definition code looks like, very similar to what is described here: within_frame("content_ifr") do editor = page.find_by_id('tinymce') editor.native.send_keys 'test' end The problem is when I run the following: editor.native.clear # works,

How to make TinyMCE work inside an UpdatePanel?

删除回忆录丶 提交于 2019-12-20 18:01:38
问题 I'm trying to do something that many people seem to have been able to do but which I am unable to implement any solution. The TinyMCE control works pretty well in an asp.net form until you enclose it with an UpdatePanel, which then breaks after postback. I have tried some fixes like the RegisterClientScriptBlock method, but am still unsuccessful, I still lose the tinyMCE control after postback. Below is a full test project (VS 2008) provided with a Control outside UpdatePanel and one inside,

remove the extra p tag in tinyMCE

给你一囗甜甜゛ 提交于 2019-12-20 11:59:15
问题 When you copy and paste from a word document in to the tinyMCE editor sometimes there are unwanted <p> tags: <p> </p> <div class="starpasspro-example-question"> <p><strong>Example: Levels of strategy</strong></p> <p>Microsoft is one of the world’s largest organisations, providing corporate solutions to businesses throughout the world to help them realise their fullest potential. At Microsoft, there are three levels of strategy as follows:</p> </div> <p> </p> Here the code that generates I

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

一世执手 提交于 2019-12-20 08:35:35
问题 The documentation is not very clear on this. name - String - Button name to add. settings - Object - Settings object with title, cmd etc . "etc"? Really? Where can I see the rest of the possible attributes? 回答1: 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 :

How to test if a HTML body contains empty tags

丶灬走出姿态 提交于 2019-12-20 06:16:22
问题 I am using a text editor on certain form fields, TinyMCE . it works ok. However the TinyMCE editor returns a HTML body tag for each field in the form. This is perfectly fine if a user completes that form field, i.e; 'description' => string '<!DOCTYPE html> <html> <head> </head> <body> a users response </body> </html>' However, if a user does not complete the field TinyMCE STILL returns a string containing an empty html body, i.e the code below: 'description' => string '<!DOCTYPE html> <html>

Is there open “Insert/Edit image” dialog event in Tinymce?

大城市里の小女人 提交于 2019-12-20 05:42:21
问题 I need to get to know when the dialog has already been opened. But I didn't find any decent way for this. The only thing I found in the documentation is editor.on() but it doesn't work with the mceImagecommand and nothing is said about mceImage in the docs. And it supposed to fire before the dialog is shown. All that comes to my mind is to attach the 'click' event on the "Image" button and wait for the dialog through the timer but it wouldn't be a very decent solution. Any better ideas? 回答1:

TinyMCE + Jquery + PHP + AJAX Special chars issue

喜你入骨 提交于 2019-12-20 05:26:23
问题 i have a TinyMCE implementation on my website that works great. But if the user enters a special char like "<" the query send to my MySQL database gets cropped just when the special char appears . Let me show you whats happining: This is how i call TinyMCE: tinyMCE.init({ mode : "exact", elements : "e_text", theme : "simple", oninit : "setPlainText", plugins : "paste" }); function setPlainText() { var ed = tinyMCE.get('e_text'); ed.pasteAsPlainText = true; if (tinymce.isOpera || /Firefox\/2/