Closed (won't fix)
Project:
TinyMCE
Version:
5.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Jan 2007 at 12:47 UTC
Updated:
3 Feb 2013 at 19:57 UTC
Hi
I've the following requirement: For the same node type some nodes must be able to switch off wysiwyg editing with tinyMCE because they want to use plain HTML.
An example of this is a blog which is usually written wit the help of tinyMCE. But once in a while I want to embed a HTML Code Block to poste a youtube video. Switching wysiwyg editing off after the node is display for editing is to late, because the HTML code has already been lost.
If <!-- no wysiwyg --> is added to the HMLT code the plugin can detect this and show the code in the standard HTML textarea.
The following snippet added to the tinymce_process_textarea function does the job:
function tinymce_process_textarea($element) {
static $is_running = FALSE;
global $user;
static $profile_name;
// if the string <!-- no wysiwyg --> apears inside the editable text, don't show tinyMCE
$textarea_value = $element['#value'];
$pos = strpos($textarea_value, '<!-- no wysiwyg -->');
if (!($pos===false)) {
$element['#resizable'] = TRUE;
return $element;
}
Comments
Comment #1
kreynen commentedComment #2
kreynen commentedhttp://drupal.org/node/130309
Comment #3
incidentist commentedThe problem is that your tags are being filtered out. What you want here, rather than a custom tag that has to be processed, is to add support for OBJECT and EMBED tags (or whatever) in TinyMCE. TinyMCE has a list of tags it accepts, and that list can be adjusted at init time or by plugins. Enabling the media plugin, for instance, will make it such that these tags will work fine. The plugin comes standard with TinyMCE, but isn't registered by the Drupal module. That should be fixed, by adding a single line to plugin_reg.php, I believe, so that the plugin can be enabled, so that TinyMCE doesn't filter out your vids.
Comment #4
johnalbinincidentist is correct. (Good catch!)
Can someone provide instructions on how to register this (and other) bundled plug-ins?
You will also need to be sure the output filter you use allows
objectorembedtags in the HTML Filter.Comment #5
pomliane commentedThis version of TinyMCE is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.