tinymce

How to remove tinymce editor buttons from Javascript?

醉酒当歌 提交于 2019-12-11 04:45:40
问题 I am using TinyMCE4.3.10 (as part of Wordpress 4.5.4). I create a custom tinymce editor using the code: tinyMCE.execCommand("mceAddEditor", false, captionId); tinyMCE.execCommand('mceAddControl', false, captionId); "captionId" points to a textarea. Editor works fine but I want to remove few buttons. How do I do that ? I am not using tinyMCE.init() -- mainly because I don't know if I should be using it and editors works anyway. I can disable using: tinyMCE.get(captionId).controlManager

TinyMCE select text and activate link dialogue with javascript

坚强是说给别人听的谎言 提交于 2019-12-11 04:19:46
问题 I'm trying to write an automated (using cucumber/capybara/selenium) test that will select some text in a tinymce box, click the link button, and open the link selection page. But the link button only becomes active when some text is selected...so round one: tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]); This selects the text of the first paragraph (good enough for my purposes) but the link box is still disabled. So then I tried to manually activate it: tinyMCE

How to work with nested property in tinyMCE in ASP.NET MVC

橙三吉。 提交于 2019-12-11 04:18:36
问题 Using the tiny MCE editor template in ASP.NET MVC provided as sample via Nuget. In this template there is a call to tinymce method as below: $('#@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)').tinymce({ . . . }); At runtime this changes to $('#fieldId').tinymce({ . . . }); It was working fine until the property which this was targeting was in the model itself. But when I moved the property inside another property, it stopped working. Now the field is like ModelView.SomeModel

fancybox 2 and tinymce jquery conflict

孤者浪人 提交于 2019-12-11 04:18:00
问题 I am using fancybox-2.0.1 in a number of areas on a website and have been doing so without a problem. I have also been using the jquery implementation of tinymce in conjunction with fancybox without a problem. However, since I changed the tinymce inti script to look like the below I started getting problems: <script type="text/javascript" src="tinymceJQ/jscripts/tiny_mce/jquery.tinymce.js"></script> <script type="text/javascript"> $(function() { var $editor = $("#appContentTextArea"); //

Limit Paste in TinyMCE

本秂侑毒 提交于 2019-12-11 04:12:24
问题 I have a TinyMCE widget that is limited to only <p> tags and non-block-level elements. Thus, the user is unable to insert tags like <div> or <table> . Which is the desired behavior. However, the user can copy any content from any web page and paste it to TinyMCE. Is there a way to prevent pasting there, or better yet, limit paste to only a set of tags? 回答1: Have a look at the paste plugin shipped with TinyMCE. 回答2: I know that in Drupal, if you use TinyMCE provided in the wysywig module, you

TinyMCE not able to load content when called for second time in one page in Mozilla

痴心易碎 提交于 2019-12-11 04:04:14
问题 Basically,I have loaded tinyMCE on the textarea. And my motive is : When the button is clicked, the editor should be filled by the description stored in database through ajax call. It works properly in Chrome. But when I run the script in Firefox,it works fine for the first time. But on pressing the button again, the description flashes for a second and disappears. The code works fine on refreshing the page . What could be problem? Any help would be helpful. 回答1: There are several

tinymce mouse paste not working

拈花ヽ惹草 提交于 2019-12-11 04:03:06
问题 i want to enable mouse paste in tinymce. when i click paste it displays error saying "cut/paste/copy is disabled in Firefox". i searched this on their forums (http://www.tinymce.com/forum/viewtopic.php?id=20637) and they say its browser(my Firefox) issue and they cannot fix it, then how come it's not an issue for WordPress? how they fixed this issue. are they using another j/s to handle it? I really need a solution please help example would be great 回答1: Using the contextmenu plugin (or an

IE7 and TinyMCE with Plone

ⅰ亾dé卋堺 提交于 2019-12-11 03:57:30
问题 In an out of the box Plone 4.1.4 (4113) on a windows server, some clientside problems occur on IE7 (I know...). Going to the main site: no problem logging in: IE raises a runtime error: Line 505: Expexted identifier, string or number Adding content: IE raises a runtime error: Line 505: Expexted identifier, string or number and gives a javascript error complaining that there is no "TinyMCE_config". This function doesn't work: TinyMCE refuses to show it's controls and IE7 gives a Javascript

How to stop TinyMCE to delete the span tags?

試著忘記壹切 提交于 2019-12-11 03:45:29
问题 Here in my work, the previous programmer decided to use the wonderful TinyMCE on the company website. One of the thousands of problems I'm having is: If the original text have any span tag, when I press the backspace to delete a line ( p tag only), all span tags are deleted from the text. This error is much more specific than the other. I can delete anything , character or tag (including the p tags), using the delete button and nothing happens. If I delete anything using the backspace button,

Tinymce strips attributes on submit

北慕城南 提交于 2019-12-11 03:43:35
问题 Tinymce loses my inline styles from all elements. I've tried pretty much everything. language : "fi", theme : "advanced", plugins : "style,paste,table,media,layer,fullscreen,autoresize", theme_advanced_disable : "help,sub,sup,anchor", theme_advanced_buttons1_add : "styleprops,fontselect,fontsizeselect,forecolor", theme_advanced_buttons2_add : "pastetext,pasteword", theme_advanced_buttons3 : "tablecontrols,hr,removeformat,media,fullscreen", remove_linebreaks : true, remove_trailing_nbsp : true