Extension talk:TinyMCE MW

MW-Tables not correct
moved from mainpage

Hi! Thanks for this extension! I installed in on my wiki but now all old tables in wiki syntax are shown in plaintext code. What do i have to change for enabling the standard mw parser as well? -- 195.127.44.186 15:12, 4 July 2007 (UTC)


 * Hi, I don't recommend installing TinyMCE for already existing Mediawiki Installations. I have not had time to test Wikitext tables, in great detail, but I could see how it would not parse correctly.  Have you tried using the Disable Advanced Editor link the saving the wikitext table?  Some other ways could be implemented to handle this problem. 1) Detect the wikitext table tags and disable TinyMCE_MW (see function wfCheckBeforeEdit). 2)Add a wikitext handler in function wfTinymceParserPaste so it will get formatted properly. 3) Just reedit the tables using the advanced editor. --JoeSox 15:56, 4 July 2007 (UTC)

Hi! I've a related Problem with this extension. It seems to be impossible to include specialpages, when $wgUseTinyMCE is on. But I've no opinion what the reason is. If I include a special page e.g., then I get some suspecious text-dump like this: �UNIQ5a6b14b632c8782d-item49d3e5cb5347be63 Other Pages can be included without Problems. I've taken a look on TinyMCE_MW.php and found out, that there are some tags replaced with md5(tagopen)_number which looks similar. But I can't solve this Problem alone. Have you perhaps an idea what is causing this bug?

Sorry, my english may be bad.

regards

-Stefan- 79.211.199.52 15:19, 19 September 2007 (UTC)

Its me again! Line breaks do not work as well. In a standard mw installation, a blank line is interpreted as a line break. If it is possible i would like to use tinymce only for creating and editing tables. Is there a possibility? -- 195.127.44.186 15:17, 4 July 2007 (UTC)


 * I have had challenges with line breaks, which you may see in the extension code. Most of this is caused by TinyMCE's built-in reformating.  Some of it is customizable.  Just dig into the TinyMCE documentation and things may become clearer to you on how to customize TinyMCE_MW.  Let me know if you have more questions or have some useful additions for the extension. --JoeSox 15:56, 4 July 2007 (UTC)

Code TinyMCE_MW.php
2 '''Click edit THEN copy and paste. If you don't, special characters will convert and the extension will not work.'''

|is", $text, $a)) {		$wgUseTinymce = false;}	else{$wgUseTinymce = true;}	return true; }

?>

Code TinyMCE_MW.php
'''Click edit THEN copy and paste. If you don't, special characters will convert and the extension will not work.'''

|is", $text, $a)) {		$wgUseTinymce = false;}	else{$wgUseTinymce = true;}	return true; }

?>

Conclusion
moved from main page Igottheconch (talk) 17:35, 21 February 2012 (UTC)

Moxiecode's TinyMCE is a very impressive WYSIWYG editor. I looked all over for a MediaWiki extention or any information. Hopefully, this works for you and is helpfull. --JoeSox 03:41, 24 June 2007 (UTC)

Error: Failed to derive URL prefix for Timeline
moved from main page Igottheconch (talk) 17:35, 21 February 2012 (UTC)

Error: MediaWiki 1.10.1 + TinyMCE 2_1_1_1 + MSServer 200
moved from main page Igottheconch (talk) 17:35, 21 February 2012 (UTC)

Aftre integrating TinyMCE 2_1_1_1 in my project (MediaWiki 1.10.1 + WAMP + MSServer 2003), MediaWik correctly work with easy, small article only. And TinyMCE don't work.

"Hide Editor" is represented in an edit window. After click on this, it changes on "Enable Advanced Editor"

If article no easy then I take Errors Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\mediawiki\extensions\TinyMCE_MW.php on line 223 or Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\mediawiki\extensions\TinyMCE_MW.php on line 226 BunakovM 13:38, 9 August 2007 (UTC)

Another Error!
moved from main page Igottheconch (talk) 17:35, 21 February 2012 (UTC)

Fatal error: Cannot instantiate non-existent class: stripstate in /home/atuaesco/public_html/extensions/TinyMCE_MW.php on line 237 What can I do?

Error: MediaWiki 1.12 + TinyMCE
moved from main page Igottheconch (talk) 17:35, 21 February 2012 (UTC)

How can I fix it? Whats the new format?

Interner Fehler

Parser::replaceVariables called using the old argument format

Backtrace:


 * 1) 0 /data/apache/users/.../.../www/Wiki/includes/Parser.php(4526): Parser->replaceVariables('', Array)
 * 2) 1 [internal function]: Parser->attributeStripCallback('', Array)
 * 3) 2 /data/apache/users/.../.../www/Wiki/includes/Sanitizer.php(479): call_user_func_array(Array, Array)
 * 4) 3 /data/apache/users/.../.../www/Wiki/extensions/TinyMCE_MW.php(253): Sanitizer::removeHTMLtags('MediaWiki wurde...', Array)
 * 5) 4 [internal function]: wfTinymceParserPaste(Object(Parser), ' MediaWiki wu...')
 * 6) 5 /data/apache/users/.../.../www/Wiki/includes/Hooks.php(113): call_user_func_array('wfTinymceParser...', Array)
 * 7) 6 /data/apache/users/.../.../www/Wiki/includes/Parser.php(432): wfRunHooks('ParserAfterTidy', Array)
 * 8) 7 /data/apache/users/.../.../www/Wiki/includes/Article.php(3174): Parser->parse('MediaWiki wurde...', Object(Title), Object(ParserOptions), true, true, 21)
 * 9) 8 /data/apache/users/.../.../www/Wiki/includes/Article.php(821): Article->outputWikiText('MediaWiki wurde...')
 * 10) 9 /data/apache/users/.../.../www/Wiki/includes/Wiki.php(390): Article->view
 * 11) 10 /data/apache/users/.../.../www/Wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 12) 11 /data/apache/users/.../.../www/Wiki/index.php(90): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 13) 12 {main}

With TinyMCE version 3.1.1, I have the same problem. To solve this problem, I have only replaced the line 4526 (is the same line number) $text = $this->replaceVariables( $text, $frame ); with $text = $this->replaceVariables( $text, false); But, I have another problem. The old articles are displayed without carriage return ! So an old document with 3 lines is now displayed on one single line ! Have somebody a solution to this new problem ?

Error.
Fatal error: Cannot instantiate non-existent class: stripstate in /home/atuaesco/public_html/extensions/TinyMCE_MW.php on line 237 I have this error when i try to edit a page

Try version 0.5.4 --JoeSox 18:33, 20 September 2007 (UTC)

Stilling having this problem. Fatal error: Cannot instantiate non-existent class: stripstate in mysite\extensions\TinyMCE_MW.php on line 245 -2009.6.21

ERROR : on file upload
Php fatal error: maximum execution time of 30 seconds exceeded in TinyMCE_MW.php on line 231 and line 234 when file upload is selected. Results in blank page and hence cannot upload files.

(Please keep in mind that TinyMCE does handle these features)

there is a bypass to the problem by adding another flag

In LocalSettings.php (root wiki dir) add the following line before require_once("$IP/extensions/TinyMCE_MW.php"); $wgRunTinyMce = true;

In SpecialUpload.php (include dir) change the function wfSpecialUpload to look like this function wfSpecialUpload {	   global $wgRunTinyMce; global $wgRequest; $wgRunTinyMce = false; $form = new UploadForm( $wgRequest ); $form->execute; $wgRunTinyMce = true; }

and the last file you need to edit is TinyMCE_MW.php (extension dir) in function wfTinymceParserPaste

add global definition for wgRunTinyMce at the beginning of the function change the following line: if ($ns_allowed and $wgUseTinymce ) {

to if ($ns_allowed and $wgUseTinymce and $wgRunTinyMce) {

sorry for my bad English feel free to rewrite the instruction

Slight fix
I use a wiki with quite a lot of rewriting happening. In my case I need to be able to set $wgTinymceDir from my LocalSettings.php. This small modification makes this possible. Line:283 if(!isset($wgTinymceDir)) $wgTinymceDir = "tinymce"; --Rob 02:39, 4 October 2007 (UTC)

The new bugfix 0.5.4 has trouble with Extension:CategoryTree
If I turn TinyMCE_MW on, end save an article with the &lt;categorytree&gt;-tag into the Editorbox (makes no difference if "hide editor" is used), then I get this error: Fatal error: Maximum execution time of 30 seconds exceeded in /srv/www/htdocs/wiki/extensions/TinyMCE_MW.php on line 119 This is on line 119 of TinyMCE_MW.php: $tinymcetext = str_replace($a[0], html_entity_decode($r), $tinymcetext);#htmlentities With your earlier version 0.5.3 this doesn't appear, so it seams to cause a bug and not fix. By comparation of these version there are big differences between the lines around 119, especialy this looks a little bit supecious: New in 0.5.4: #Allow_categorytree_tags while (preg_match("| |is", $tinymcetext, $a)) { ... Old code in 0.5.3: #Allow_categorytree_tags while (preg_match("|&amp;lt;categorytree&amp;gt;(.*?)&amp;lt;/categorytree&amp;gt;|is", $tinymcetext, $a)) { ... We now rollback to 0.5.3 but I'll be greatefull if this plugin will improved in future.

Regards -Stefan

79.211.199.93 12:02, 4 October 2007 (UTC)

mediawiki 1.12.0
Does anyone have this installed on mediawiki version 1.12.0? I tried following the directions over here: TinyMCE_MW.

Setup: MW 1.12 | Windows 2003 w/ IIS. | MYSQL 5.x | PHP 5.25

But i had no luck, i got the following error: Internal error

Parser::replaceVariables called using the old argument format

Backtrace:

Mlong212 05:29, 20 April 2008 (CEST)
 * 0 W:\Wiki\mediawiki-1.12.0\includes\Parser.php(4526): Parser->replaceVariables('', Array)
 * 1) 1 [internal function]: Parser->attributeStripCallback('', Array)
 * 2 W:\Wiki\mediawiki-1.12.0\includes\Sanitizer.php(479): call_user_func_array(Array, Array)
 * 3 W:\Wiki\mediawiki-1.12.0\extensions\TinyMCE_MW.php(255): Sanitizer::removeHTMLtags(' Me...', Array)
 * 1) 4 [internal function]: wfTinymceParserPaste(Object(Parser), ' Medi...')
 * 5 W:\Wiki\mediawiki-1.12.0\includes\Hooks.php(113): call_user_func_array('wfTinymceParser...', Array)
 * 6 W:\Wiki\mediawiki-1.12.0\includes\Parser.php(432): wfRunHooks('ParserAfterTidy', Array)
 * 7 W:\Wiki\mediawiki-1.12.0\includes\Article.php(3174): Parser->parse(' '''MediaWi...', Object(Title), Object(ParserOptions), true, true, 8)
 * 8 W:\Wiki\mediawiki-1.12.0\includes\Article.php(821): Article->outputWikiText(' '''MediaWi...')
 * 9 W:\Wiki\mediawiki-1.12.0\includes\Wiki.php(390): Article->view
 * 1) 10 W:\Wiki\mediawiki-1.12.0\includes\Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 2) 11 W:\Wiki\mediawiki-1.12.0\index.php(90): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 3) 12 {main}

You need to change the following line in TinyMCE_MW.php (~line 255) $tinymcetext = Sanitizer::removeHTMLtags( $tinymcetext, array( &$q, 'attributeStripCallback' ) );

to the following $tinymcetext = Sanitizer::removeHTMLtags( $tinymcetext, 'attributeStripCallback', array( &$q ) );

Very close to working! The above change allowed me in to the main page without halting on error, however:
 * 1) Additional html code is shown on everything & the page layout is not as it was (without even editing yet)
 * 2) When trying to edit a page it displays the error: PHP Fatal Error: Maximum execution time of 30 seconds exceeded in (filepath)\extensions\TinyMCE_MW.php on line XXX
 * 3) XXX because it is different each time though it does seem to hit on a line containing: $tinymcetext = str_replace($a[0], html_entity_decode($r), $tinymcetext);#htmlentities

Cannot modify header information
I got several warnings like

"Warning: Cannot modify header information - headers already sent by [...]"

my solution:

"eliminate additional whitespace before and after the and tags in the TinyMCE_MW.php file" (http://tinymce.moxiecode.com/punbb/viewtopic.php?id=8233) which was for me to delete the tags: ,  and a built-in   theme from LocalSettings.php. TinyMCE_MW was built and tested on Mediawiki-1.10.0, IE 6. Successfully tested CategoryTree extension for compatibility with new tags.

'''Several users have reported errors installing this extension in MW 1.12 (see section below); at best it is unstable. Until patches or other fixes are posted, it is not recommended for use with MW 1.12 or later.'''

Requested Features

 * Enable Ajax usage.
 * Enable Embedded of Youtube Vids like in FramedVideo (FramedVideo dosn´t work with the editor)

Changing TinyMCE Font and Font Size
After hours of trial and error and googling, I am deciding to share some very helpful information. NOTE:To change the default font and size for TinyMCE, add these two lines to your theme's editor_content.css body{} section: font-family: Arial; font-size: 14px; NOTE:To decrease the space between lines after a carriage return place this line to your theme's editor_content.css: p {margin: 0; padding: 0;}

NOTE: Delete all of your cache (temporary internet files), then close your browser. Then re-open your browser.

Mediawiki 1.18
Unfortunately this plugin has a big problem with rendering templates. I've just started to testing it - and bam! after 15 second I found already a bug:( I will continue my testing but at least at this moment I'm rather dissapointed.

TinyMCE and php 5.5
there is a problem with php 5.5 and the TinyMCE_MW Plugin. The "===" from the wikisyntax doesn't convert to a HTML - Tag. Can someone give me a Bugfix or can someone say, where the Wikisyntax is convert to the HTML-code?