tinymce

TinyMCE: Disable 'resizable' function for specific div?

空扰寡人 提交于 2020-01-02 20:18:09
问题 I have a plugin in Wordpress that uses jQuery Resizable to resize dialogs in TinyMCE. There's one <div> in particular (shown below) that I don't want to be resizable. How do I accomplish this? This is the outputted <div> I don't want resizable: <div class="ui-dialog ui-widget ui-widget-content ui-corner-all wp-dialog ui-draggable ui-resizable" tabindex="-1" role="dialog" aria-labelledby="ui-id-1"> This is the resizable handle's output: <div class="ui-resizable-handle ui-resizable-se ui-icon

Javascript: Workaround needed: Internet Explorer changes link text when changing the href

半城伤御伤魂 提交于 2020-01-02 04:19:05
问题 I have a problem as follows: We're using a rich text editor (TinyMCE, but that's not important here, I think) in our application. Now, with Internet Explorer 8, we've noticed that if you type in content that looks like a web address: www.google.com ...IE helpfully converts it to a link by some native-to-browser functionality. Now if you really want to make it into a link, and choose to edit link properties, and set the href e.g. to www.google.com/analytics ...then when the javascript sets the

TinyMCE 4 can't type in provided plugin text fields

痞子三分冷 提交于 2020-01-02 03:45:07
问题 Using TinyMCE 4.1.5 under JS (w/ JQuery 1.11.1 and several JQuery plugins like form and ui). The TinyMCE version I'm using is not the one with embedded JQuery. The editor comes up fine and I can type directly in it without issue. Using only the tinymce-provided plugins, all functions that use buttons or non-text field controls work fine. However, the text fields in the plugins (such as in link or insert video) won't let me type into the fields or select other text fields (so it seems like a

Script tags in TinyMCE fields are not saving correctly

血红的双手。 提交于 2020-01-02 03:25:09
问题 I am running tinyMCE on my site and I'm trying to insert script tags. I am trying to insert my script tags into the body of the source of the tinyMCE instance. However, when I do I get problems. When I submit the form including the tinyMCE element It strips the tags. I have tried the following lines below with still no success. allow_script_urls: true valid_elements : '*[*]' extended_valid_elements: 'script[language|type]' One thing I have noticed though that if I have to post the script code

How do I allow a self closing tag in TinyMCE?

老子叫甜甜 提交于 2020-01-01 14:49:10
问题 The source tags inside my video element need to be self closing so the iPad doesn't start whinging. I type in <source src="myVideo.m4v" /> TinyMCE keeps changing it to <source src="myVideo.m4v" ></source> though. How can I tell it to stop? 回答1: Have a look at valid_elements and extended_valid_elements. EDIT: You may use the closed setting in your tinymce init: closed : /^(br|hr|input|meta|img|link|param|area)$/, // default to closed: /^(br|hr|input|meta|img|link|param|area|source)$/, If this

Command identifiers for tinymce 4.x (mceAddControl)

ⅰ亾dé卋堺 提交于 2020-01-01 11:55:08
问题 I am migrating from tinyMCE 3.x to the latest version of tinyMCE 4.x. My problem is that I have dynamic generation of tinyMCE instances so in 3.x I was using: tinymce.EditorManager.execCommand('mceAddControl', true, "content_txt"); but in version 4.x this doesn't work. I started to check the documentation but I can't find the identifiers for version 4.x 回答1: Migration is very simple, replace tinymce.EditorManager.execCommand('mceAddControl', true, "content_txt"); by tinymce.EditorManager

Tinymce - insert html code

99封情书 提交于 2020-01-01 06:13:27
问题 I would appreciate if there is someone who can help me solve this problem, I've been trying to resolve it for few days, but with no success. I made custom button that inserts image into code, and here is textual version: <a href="javascript:;" onmousedown="tinyMCE.execCommand('mceInsertContent',false,'<br><img alt=$img_title src=$link/img/sadrzaj/$file\>');">Insert Image</a> Problem is that I'm not allowed to use quotes so I have to use alt=Some_value and quotes are added automaticly. Problem

How to make an element in a TinyMCE editor treated as a non-editable single item?

回眸只為那壹抹淺笑 提交于 2019-12-31 21:40:31
问题 Within our CMS, our users can edit error messages for forms using TinyMCE. The problem is, some of these messages may require dynamic data, e.g. "Your chosen name 'X' is invalid" . To do this, we are using tokens . Using the above as an example, our user would type in "Your chosen name '{name}' is invalid" , and it would get replaced on render. I'm currently writing a plugin for TinyMCE to better help the user manage these tokens. They would click the icon, select a token from a predefined

TinyMCE is adding &nbsp instead of the space when using the word paste

我的梦境 提交于 2019-12-31 00:30:31
问题 I am using the TinyMCE editor and the paste from word function. My problem is that when I have spaces, tinyMCE transform them in &nbsp and I would like to keep the normal space. Is there a filtering function or something similar which can be used in tinyMCe.init which will do that? Thank you. 回答1: I have found a soultion, I am not sure that's the proper one, but it works. In the tinyMCE.init, I added: paste_auto_cleanup_on_paste : true, paste_postprocess : function(pl, o) { // remove extra

AngularJS Navigation does not work after tinymce directive

谁都会走 提交于 2019-12-30 09:37:09
问题 I have problem I can't figure out but I do have a hint. Before integrating TinyMCE the main navigation was working fine eg links Settings, Analytics, Setup; it isn't working now if you click them. Here is my js file: var app_htmleditor_module = angular.module('app_htmleditor', ['components']). config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', {templateUrl: getBaseURL()+'public/tpl/app/htmleditor.htm', controller: HtmlEditorCtrl, reloadOnSearch:false }). otherwise(