EzDevInfo.com

tinymce

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL. TinyMCE - Home the most advanced wysiwyg html editor

TinyMCE Paths, How to specify where to load things like editor_plugin.js

I installed TinyMCE, everything was working great. I then used Google Closure to package my site's JavaScript along with TinyMCE_src

The problem I'm having is that TinyMCE is now making calls to:

plugins/paste/editor_plugin.js
themes/advanced/editor_template.js
langs/en.js

And that paths that are being used are invalid, they are 404'ing

How can I tell TinyMCE where to go to get these files?

I tried:

relative_urls : false,
document_base_url : "http://www.site.com/path1/",

But they have no effect on the files above.

Advise? Thanks


Source: (StackOverflow)

How to automatic resize tinyMCE?

I have a TinyMCE that is set over a TextArea, and I want this editor area to ocuppy all the space of its parent div, all times.

I have a JS function that get the current space and set the textarea.style.height to it, but when I enables TinyMCE it seems to stop working.

Also, the textarea has width: 100%; it doesn't resize by HTML rendering when it's using TinyMCE too.

Any ideas?


Source: (StackOverflow)

Advertisements

TinyMCE skin or theme that caresses the eyeballs like a milk to a goat [closed]

Where can I find a visually appealing TinyMCE skin or theme?

I'm looking for skin that's a little less Office 98.


Source: (StackOverflow)

tinymce jquery version vs jquery plugin

What is the difference between tinymce jQuery version and tinymce jQuery plugin? Are there any functionality differences? What are some criteria for deciding which one to use?


Source: (StackOverflow)

How to make tinymce paste in plain text by default

Googled it thousands of times, No one gives a complete solution of how to make Tinymce paste in plain text by default and strip out any formatting without clicking the "paste as text" button.

Any Ideas of how to implement that? or how to enable the "paste as text" button automatically?

Thank you


Source: (StackOverflow)

JQuery to load Javascript file dynamically

I have a very large javascript file I would like to load only if the user clicks on a certain button. I am using jQuery as my framework. Is there a built-in method or plugin that will help me do this?

Some more detail: I have a "Add Comment" button that should load the TinyMCE javascript file (I've boiled all the TinyMCE stuff down to a single JS file), then call tinyMCE.init(...).

I don't want to load this at the initial page load because not everyone will click "Add Comment".

I understand I can just do:

$("#addComment").click(function(e) { document.write("<script...") });

but is there a better/encapsulated way?


Source: (StackOverflow)

Problem jquery and tinymce : textarea value doesn't submit

I am using jquery and TinyMce to submit a form, but there is a problem in serialization in that the Textarea value doesn't post.

Here is the code:

<form id="myForm" method="post" action="post.php"><textarea name="question_text" id="question_text" style="width:543px;height:250px;"></textarea></form>

$('#myForm').submit(function() {
    $.ajax({
        type: 'POST',
        url: $(this).attr('action'),
        data: $(this).serialize(),
        success: function(data) {
            $('#result').fadeIn('slow');
            $('#result').html(data);
            $('.loading').hide();
        }
    })
    return false;
});

tinyMCE.init({
    // General options
    mode : "textareas",
    theme : "advanced",     

    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,separator,image,separator,justifyleft,justifycenter,justifyright,jformatselect,fontselect,fontsizeselect,justifyfull,bullist,numlist,undo,redo,styleprops,cite,link,unlink,media,advhr,code,preview",
    theme_advanced_buttons2 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resize_horizontal : false,
    theme_advanced_resizing : true,
    extended_valid_elements :"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
});

Can you explain to me what I should change, and why, in order to get the value in the text area posted?


Source: (StackOverflow)

Remove menu and status bars in TinyMCE 4

I am trying to remove the menu and status bars from TinyMCE 4 because I want to setup a very basic editor. Is this possible?

The documentation for TinyMCE 3 does not seem to be relevant and I cannot find anything for version 4.


Source: (StackOverflow)

Get TinyMCE to use full image url instead of relative one

I use TinyMCE as editor on a website. Problem is, when I insert images from the same site, TinyMCE will use relative url to the image instead of the fixed url I entered when including the image.

The resulting html is used elsewhere, for example in emails. Problem is, relative urls will not show up properly anywhere but in the original location.

How do I get TinyMCE to use full absolute urls instead of shortened relative ones?


Source: (StackOverflow)

TinyMCE Paste As Plain Text

This is one of the common issue with RTEs on web. Could you please guide me through how to:

  1. Paste as the PLAIN TEXT
  2. Retain the HTML but remove the WORD/HTML styling

I want to do it directly on paste (paste_preprocess callback), without opening the dialogs provided by Paste plugins.

Any thoughts/experiences ?

Thanks,

Imran


Source: (StackOverflow)

Problem when retrieving text in JSON format containing line breaks with jQuery

I'm having a strange problem when retrieving JSON formatted text. I use jQuery post to send some data (also JSON formatted) to the server (running PHP) which works fine. Then, when I request the same data from the server using jQuery get, the callback method never executes. This only occurs when the data is JSON formatted and the data contains a line break. When I don't use JSON formatting it works fine. What baffles me is that there are no problems with uploading the data.

Uploading code: (works)

$.post("ajax/contents_ajax.php", {
    'title': caption,
    'text': frameText().getContent(),
    'image_id': img
},
//Callback

Download code: (doesn't work with line breaks)

$.get("ajax/contents_ajax.php", { 'get_item': id },
function (data){
    //Never gets executed if data contains line breaks
}
,'json');

The whole problem stems from the fact that the TinyMCE rich text editor seems to insist on inserting line breaks everywhere, even though I enabled the option

remove_linebreaks : true

I do prefer to have line breaks, but not if they break my code. Can anyone tell me what the problem is here, and perhaps how I can encode the linebreaks on the server with PHP?


Update

While the suggestions to replace '\n' with '' did not work, it was close to the right solution. This code removed the offending characters:

function parse($text){
    $parsedText = str_replace(chr(10), "", $text);
    return str_replace(chr(13), "", $parsedText);

}

Source: (StackOverflow)

Call TinyMCE in a WordPress plugin

Is there a way to add TinyMCE into my own WordPress plugin?

I have a textarea in my back end script and want to make this area into a TinyMCE WYSIWYG editable field. Is there a way to do that?

wysiwyg demonstration screenshot

This code does not work for me:

<?php
    wp_tiny_mce(false,array("editor_selector" => "test"));
?>
<textarea class="test" id="test" name="test"></textarea>

It shows the javascript error

f is undefined

Firebug screenshot: TinyMCE error

This didn't work either:

<textarea class="theEditor" id="videogalerie-add_description" name="videogalerie-add_description"></textarea>

Source: (StackOverflow)

TinyMCE is removing