Could be included in the button options for the toolbar, no?

CommentFileSizeAuthor
#10 wysiwyg_tinymce_blockquote.patch743 bytesquicksketch

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Are those supported in TinyMCE 2.x?

sun’s picture

From #273400: inserting code tags:

been messin with it for hours now. input formats to allow everything, tried all combinations of cleanup/output. it's ok if you just save the node from rich-text-disabled mode but it gets stripped when you go back and edit.

Well, it doesn't seem to me that <code> is a supported editor plugin. If it was, then it would probably need a similar plugin configuration like, f.e. the advhr plugin (in wysiwyg_editor.plugins.inc):

        'advhr' => array(
          'path' => $path_editor .'/plugins/advhr',
          'buttons' => array('advhr' => t('Advanced horizontal rule')),
          'extended_valid_elements' => array('hr[class|width|size|noshade]'),
          'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
          'internal' => TRUE,
          'load' => TRUE,
        ),

However, don't try to just exchange the strings of this snippet, because there is no "real" code plugin for TinyMCE yet. Even worse, the advanced theme ships with a "code" plugin - which is the well-known "HTML" button in the toolbar.

Regarding blockquote, I've found http://sourceforge.net/tracker/index.php?func=detail&aid=1498692&group_i...

aterchin’s picture

Yeah the code button is misleading for sure when you first see it. I found a plugin for code tags, icode.
http://www.chronosight.net/view/2006/09/626-icode-plugin-for-tinymce.html

I dropped the icode folder in the wysiwyg/plugins directory tried adding it to the list in wysiwyg_editor.plugins.inc file as:

'icode' => array(
          'path' => $path_wysiwyg .'/plugins/icode',
          'buttons' => array('iCode' => t('iCode')),
          'url' => 'http://www.chronosight.net/view/2006/09/626-icode-plugin-for-tinymce.html',
        ),

enabled it but im obviously missing a step as i couldnt get it working right.

sun’s picture

The iCode in buttons' => array('iCode' must be lowercase.
And you need to add this line

  'extended_valid_elements' => array('code'),
aterchin’s picture

Yeah, thanks sun. that worked but then i'd have to make it see script tags and php tags and it's starting to become a nightmare when i think about it. i'll wait till someone smarter than me comes up with a proper updated plugin.

sun’s picture

Status: Postponed (maintainer needs more info) » Active

I just found out that 'code' as well as 'blockquote' are valid block formats and already implemented in TinyMCE's default advanced theme. I wasn't aware of that, as someone seems to have decided that those block formats shouldn't be listed by default in the profile configuration (back in times of tinymce module). So you just have to list them in the comma-separated block format list. However, my testing revealed one caveat: Those block formats can be applied, but TinyMCE (v2.x) seems to be unable to remove them once applied.

scottrigby’s picture

Hi – seems this might be the right place to ask...
I'm using the current wysiwyg-5.x-1.x-dev.tar
I need to add some javascript to a few pages that I also want users to edit the rest of the page using the WYSIWYG.

The problem is my

tags are getting stripped. This conversation seems like there may be some answers and so I'm hoping someone can recommend a solution - not even the best one... just something that works. I tested without wysiwyg by the way, and all works well --- but with wysiwyg, the script tags magically disappear. Any advice or help would be really appreciated! :) Scott
scottrigby’s picture

I realize most of this doesn't apply, but could there be anything useful here?
http://drupal.org/node/51097

sun’s picture

@scottrigby: This is a different topic, moving over to #294417: Disable client-side editor HTML filtering

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new743 bytes

I'm using tinyMCE 3, and I'm not sure what affect this has on tinyMCE 2 (in regards to #6, where sun reports you can't unset blockquotes), but here's a patch that adds in blockquote. Works out of box for me.

sun’s picture

Status: Needs review » Fixed

Although this button is only available in TinyMCE 3, I committed this patch, because no one cares about a two year old editor release, and we have to sort out a way to differentiate buttons/plugins for different editor versions in the plugin API anyway.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.