TinyMCE Extended v1.0

Release Notes

An extended tinymce plugin that does not incorporate a browse, upload and embed 

facility. Suitable for people that want to use the default Elgg upload/embed feature 

but like more facilities than the basic and simple tinymce.

IMPORTANT ... place below the 'embed' plugin. (Thanks to Wayne b).

Features: align left/right/centre/full, date/timestamp, preview, print, cut, copy, paste, search, replace, font family and size, erase format and emoticons.

Tested on Elgg v1.5


tinymce ext

  • Does anyone here happen to know how the Wordpress version of TinyMCE is able to automatically strip all formatting except bold and italics from copied text?

  • Phil ... I'm wondering if it's possible to include iframe support in a tinymce extender like yours but to make it available only to admins in order to avoid hacker insertions and so on.

    The reason I ask is that I'd like to insert an iframe including a google docs file into pages but when I attempt this in the existing html mode, the entire tag gets stripped.

    Any ideas?

  • @chiinook, I think you need to take a look at the moxiecode tinymce docs on valid elements.

    You have to add valid elements,  in elgg>mod>tinymce>tinymce>views>default>longtext.php

    extended_valid_elements : "iframe[src|width|height|name|align]",

  • That worked great ... kinda. I now get my I frame to show up in the editor but it gets stripped out once I save. Suggests that there is something deeper in Elgg doing the stripping. Any thoughts?

  • I've done a search and found something I think is the same issue (ish)...


    It might be worth raising the issue again there and/or in any related groups here?

    Have a look at this too...


    Sorry I couldn't be any further help chiinook.

  • does the spell checker work with firefox ? i dont see a spell check button anywhere tho :S

  • Does anyone know how to turn off the TinyMCE plugin for certain pages or forms?

    Like I want it to be on for Group discussions, but I don't want it to be on for adding Bookmarks.

  • Hi,

    I am still trying to figure out how to allow code (PHP, javascript, ssi,)  in posts without it being stripped by the TinyMCE editor (It kills the code like Ad sense by Google or map by Google)…when switching between visual and HTML modes. I understand that by default, WYSIWYG editor, TinyMCE, will strip out of your Article and Page HTML code any elements that are not defined as “valid elements”.

    Does any one know and help to figure out how the editor will allow you to extend what TinyMCE defines as “valid elements”?


  • I think you're wasting your time Davide ... I'm sure this is an elgg safeguard, a good search of the lgg google developers group should turn up some results but to my knowledge nobody has figured out a way around it yet.



  • Hi Phil,


    Thank you so much for the advise…in fact I was almost running crazy to get some one to do it for me…well at least now I am conscious that I should look for other ways for my posts. Hope they will figure out a way …one day…it would be really helpful! In the meantime…all the best!

  • I am trying to create a textarea without the tinymce but it have been unsuccessful. The tinymce editor only shows up if I am on the messages page. I have created a chat bar option that that has a textarea and shows the tinymce. Is there a way to remove this from the chatbar?

  • Not sure it's worth re-packaging the plugin for, but I made a little change based on the documentation for tinymce. I don't like popup windows so I changed tinymce to use thickbox and inline windows instead.

    I edited mod/tinymce/views/default/input/longtext.php

    in the tinyMCE.init{{ function I added the inlinepops plugin and added dialog_types : "modal"

    Here is the full function:

    <script language="javascript" type="text/javascript">
        mode : "textareas",
        theme : "advanced",
        plugins : "preview,print,emotions,searchreplace,insertdatetime,inlinepopups",
        dialog_types : "modal",
        plugin_preview_width : "500",
        plugin_preview_height : "600",
        plugin_insertdate_dateFormat : "%Y-%m-%d",
        plugin_insertdate_timeFormat : "%H:%M:%S",
        relative_urls : false,
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,|,link,unlink,|,image,|,blockquote,|,code,|,newdocument,|,preview,print,|,insertdate,inserttime",
        theme_advanced_buttons2 : ",justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,|,search,replace,|,fontselect,fontsizeselect,|,removeformat,|,emotions",                    
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        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|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"

    Hope it helps...


  • <!--[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <![endif]--><!--[if gte mso 9]> <![endif]--> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1593833729 1073750107 16 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Verdana","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Verdana; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Verdana; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> <!--[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} <![endif]-->

    Has anyone figured out why pasting from MS Office documents that include layout CSS breaks tinymce?

  • The above being an example of such behaviour.  To reproduce, open word, type in a sentence, copy and paste into this form, hit submit.

  • Hi guys,

    You can disable the ELGG-enforced stripping by disabling the HTMLAWD plugin, it took me awhile to figure that out, but it seems to work.

    Then you can enable/disable certain tags with valid_elements and extended_valid_elements the longtext.php file explained somewhere in the comments. I used the xhtml valid stringset provided by tinymce.org make sure you rewrite the string so there are no enters/linebreaks in that string.


  • Anyone having problems with the preview button?  I doesn't popup a window.

  • No worries, found the bug and it's corrected


  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3096
  • Recommendations: 3

Other Projects

View Phil's plugins