This question about Configuration: Answered
TinyMCE is able to provide buttons for superscript and subscript (see
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_buttons_1_n ).
I wonder:
- Is there a special reason why they aren't enabled by default?
- How do I enable them for my installation?
And the same questions for the fullscreen mode button...
I didn't find any hints on this on the entire foswiki site.
--
PhilippLeufke
The reason is simple: Foswikis markup language (TML) does not support them. Of course, you can enable them, but this will lead to bare html in your topics (for those markups). The intention of TML is to minimize the amount of html in the topic. If you are living in a wysiwyg-only world or all your users can read html, just go ahead and enable those buttons.
Regarding the fullscreen mode: no idea.
--
OliverKrueger - 05 Aug 2009
Thanks for your reply!
Got the point about why it's not enabled, but I don't completely agree, since some other TinyMCE features will also produce HTML code, like choosing a
non-standard text color (see raw view), when doing some formatting on tables. Anyway, this is not to be discussed right here.
But as I'm still in the dark about how
to enable the buttons, I'm setting the status to asked again.
--
PhilippLeufke - 06 Aug 2009
Configuring tinymce is probably a bit out of scope for the foswiki documentation. Please see
http://tinymce.moxiecode.com/documentation.php. Since nobody else has something to add, Im setting this to
Closed unanswered
.
--
OliverKrueger - 15 Sep 2009
According to
TinyMCEPlugin#Preferences, you can use the TINYMCEPLUGIN_INIT to redefine all the options passed to the Tiny MCE editor. So I would try defining that in a topic with all the options you want.
I tried in
Sandbox.TestTopic44453 but couldn't get it working. I suggest you play around with that and let us know how you get on. Then we can update the docs to make it more obvious.
--
AndrewJones - 29 Sep 2009
- Set TINYMCEPLUGIN_INIT = mode:"textareas", editor_selector : "foswikiWysiwygEdit", save_on_tinymce_forms: true, cleanup : true, theme : "advanced", convert_urls : true, relative_urls : false, remove_script_host : false, dialog_type: "modal", extended_valid_elements : "li[type]", forced_root_block : false, setupcontent_callback : FoswikiTiny.setUpContent, urlconverter_callback : "FoswikiTiny.convertLink", foswikipuburl_callback : "FoswikiTiny.convertPubURL", save_callback : "FoswikiTiny.saveCallback", debug:true, plugins : "table,searchreplace,autosave,paste,safari,inlinepopups,fullscreen,foswikibuttons,foswikiimage", foswiki_secret_id : "WYSIWYG content - do not remove this comment, and never use this identical text in your topics", foswiki_vars : { PUBURLPATH : "/pub", PUBURL : "http://365847.689093.cn/pub", WEB : "Support", TOPIC : "Question249", ATTACHURL : "http://365847.689093.cn/pub/Support/Question249", ATTACHURLPATH : "/pub/Support/Question249", VIEWSCRIPTURL : "http://365847.689093.cn", SCRIPTSUFFIX: "", SCRIPTURL : "http://365847.689093.cn/bin", SYSTEMWEB: "System" }, theme_advanced_toolbar_align : "left", foswikibuttons_formats : [ { name: "Normal", el: "div", style: null }, { name: "Heading 1", el: "h1", style: null }, { name: "Heading 2", el: "h2", style: null }, { name: "Heading 3", el: "h3", style: null }, { name: "Heading 4", el: "h4", style: null }, { name: "Heading 5", el: "h5", style: null }, { name: "Heading 6", el: "h6", style: null }, { name: "VERBATIM", el: "pre", style: "TMLverbatim" }, { name: "LITERAL", el: "span", style: "WYSIWYG_LITERAL" }, { name: "Protect on save", el: null, style: "WYSIWYG_PROTECTED" }, { name: "Protect forever", el: null, style: "WYSIWYG_STICKY" } ], paste_create_paragraphs : true, paste_create_linebreaks : false, paste_convert_middot_lists : true, paste_convert_headers_to_strong : false, paste_remove_spans: true, paste_remove_styles: true, paste_strip_class_attributes: "all", theme_advanced_buttons1 : "foswikiformat,separator,bold,italic,sup,sub,tt,colour,removeformat,separator,bullist,numlist,outdent,indent,blockquote,separator,link,unlink,anchor,separator,undo,redo,separator,search,replace", theme_advanced_buttons2: "tablecontrols,separator,attach,image,charmap,hr,separator,code,hide,fullscreen", theme_advanced_buttons3: "", theme_advanced_toolbar_location: "top", theme_advanced_resize_horizontal : false, theme_advanced_resizing : true, theme_advanced_path: false, theme_advanced_statusbar_location : "bottom", keep_styles : false, content_css : "/pub/System/TinyMCEPlugin/wysiwyg_src.css,/pub/System/SkinTemplates/base.css,/pub/System/PatternSkinTheme/style.css,/pub/System/PatternSkinTheme/colors.css"
Hi,
The above Set statement will give sup and sub buttons on the first toolbar row. The trick is that in the
advanced_theme
, these buttons are known as
sup
and
sub
, which should be included in your toolbar def.
I am very slowly working towards making the
TinyMCEPlugin much more user friendly for customising toolbar and plugins. This work won't be ready until later this year.
In the meantime, please be aware that if you
do set a custom
TINYMCEPLUGIN_INIT
Eg. in your
SitePreferences topic, to please check every time you upgrade the plugin or your foswiki that the default
_INIT
has not changed; and if it has, to incorporate the changes Foswiki has made to the default into your own custom _INIT string.
Cheers
--
PaulHarvey - 11 Jan 2010
Thanks!
--
PhilippLeufke - 11 Jan 2010
Doesn't work on Foswiki 1.1.2 for me
--
PhilippWeber - 26 Nov 2010
On Foswiki 1.1.x just add the following line to your
Main.SitePreferences
- Set TINYMCEPLUGIN_ADDITIONAL_BUTTONS1 = sup,sub
--
PhilippWeber - 29 Nov 2010