tinymce

Wordpress tinymce editor height bug

好久不见. 提交于 2019-12-23 05:22:34
问题 The screenshot shows the issue: toolbar/content height. tinymcse related code: // wordpress plugin: add_filter('admin_head', array($this, 'editor_tiny_mce')); add_filter('tiny_mce_before_init', array($this, 'change_mce_options')); function editor_tiny_mce() { wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); wp_print_scripts('editor'); if (function_exists('add_thickbox')) { add_thickbox(); } wp_print_scripts('media-upload'); if (function_exists('wp_tiny_mce')) { wp_tiny_mce(); }

tinymce implementation with php

与世无争的帅哥 提交于 2019-12-23 03:47:11
问题 I newly tried to use TinyMCE in my website but the problem was that by very simple implementation of it in very basic page mentioned in the TinyMCE website I got unexpected result. With the following code the browser only display the large blank area with only a save button. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head> <title>TinyMCE Test</title> <meta http-equiv="content-type"

TinyMCE: Double forecolor and backcolor buttons?

时光总嘲笑我的痴心妄想 提交于 2019-12-23 03:24:07
问题 I'm having a problem using TinyMCE. In IE8, the forecolor and backcolor, for some random reason, is displayed twice. See picture below. TinyMCE http://img27.yfrog.com/img27/7325/tinymcedoubleforecolorb.jpg Source code (I add the forecolor and backcolor in theme_advanced_buttons2 ): tinyMCE.init({ mode : "exact", elements : "<%= editArea.ClientID %>", custom_shortcuts : false, language : "en", relative_urls : false, convert_urls : false, forced_root_block : false, force_p_newlines : true,

TinyMCE with Django: “This field is required”

五迷三道 提交于 2019-12-23 03:22:41
问题 I'm currently having issues using the TinyMCE editor within the Django admin interface. When entering text into two particular TinyMCE fields and pressing save, the form is returned with both fields empty, flagged red and tagged with a "This field is required" label: This behaviour is odd, as I have implemented various TinyMCE editors within different models which have worked perfectly. I should clarify that I wish for both fields to be mandatory. The problem is that the text entered is being

Can't submit a form with Symfony2 and TinyMCE

元气小坏坏 提交于 2019-12-23 03:17:27
问题 I have a form with a textarea enriched by the TinyMCE Javascript library. When the Javascript library is enabled, then if I press the submit button the page don't change! If I disable the library, everything works right! One may observe that the library is not used properly (I'm using the simplest example from the for dummies tutorial). However, I think that it is something related with the framework I'm using to develop the website: Symfony2. Any idea? 回答1: Sorry for the question, the answer

tinyMCE callback handler on image drag&drop

风格不统一 提交于 2019-12-23 03:07:32
问题 tinyMCE supports dragging images from a website (not local file browser) to the rich text editor field. They get converted to and <img src=''>...</img> tag and are immediately displayed as images. I would like to change the src url of the image tag when it is inserted that way. I tried using the urlconverter_callback handler and the paste_preprocess handler from the paste plugin but neither of them get triggered when I drop the image to the editor field. Which callback can I use to react on

First dynamically-added TinyMCE editor displays, others do not

风流意气都作罢 提交于 2019-12-23 01:44:53
问题 I'm building a javascript app that will be displaying a live-updated discussion thread. It will regularly poll the server for new data, and write it to the page. For posting comments and replies, we are trying to use the TinyMCE WYSIWYG editor, which converts a textarea into a nice HTML editor. This is my first experience with this editor. The app relies heavily on jQuery, so we are using TinyMCE's jQuery plugin to make it easier to work with. Here's the issue... Every time our code generates

validate textarea using tinyMCE - jquery

别来无恙 提交于 2019-12-23 01:43:27
问题 I'm trying to validate a textarea so a user can't add a new empty message via tinyMCE textarea. But it just don't seems to work. What am i doing wrong ? JS: var msg = $("#msg"); if(msg.val() == ''){ $("#msg_error").html("* Can't add an empty message"); } Textarea <textarea rows="5" cols="35" id="msg"></textarea> 回答1: The textarea in TinyMCE is not always purely empty, althuogh you see nothing, TinyMCE automatically adds html to the textarea. What this means is the textarea will contain html

When I save span with style to MySQL, style is deleted

喜欢而已 提交于 2019-12-23 01:42:22
问题 I am using TinyMCE for my PHP/CodeIgniter CMS back-end input. However when I use a text color, some of codes are not saved and does not show the correct color. How can I solve this problem? Thanks in advance. <span style="color: #ff00ff;">Some text</span> becomes <span #ff00ff;">Some text</span> in database Some codes are here. In my controller. function _fields() { $data = array( .... 'content' => $_POST['content'], .... ); return $data; } function create() { // We need TinyMCE, so load it

I use AntiXSS but I still can hack page

跟風遠走 提交于 2019-12-22 21:30:57
问题 I don't know if I am doing this right. I first time build something to prevent attack on page. I will start from the bottom: I have property: public string Description {get;set;} User can set it's value through tinyMCE tinyMCE.init({ mode: "textareas", theme: "advanced", encoding : "xml"... In controller before I save this in database I do: model.Description = HttpUtility.HtmlDecode(model.Description); In database I have a value like: <p>bla bla bla</p> I added AntiXSS library to my project: