Extension talk:WYSIWYG/2013
Add topic| This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Fixed bugs: WYSIWYG doesn't show, Indent function doesn't work
[edit]I found some solutions to fix these bugs on WYSIWYG
1/ Fix: WYSIWYG doesn't show on PHP 5.4.x/IE browser with Proxy Settings
- Open file /WYSIWYG/ckeditor/config.js
- Delete or comment out these lines
// SMWHalo extension
var qiButton, stbButton;
if ( ('SMW_HALO_VERSION').InArray(window.parent.wgCKeditorUseBuildin4Extensions) || showTbButton) {
CKEDITOR.plugins.addExternal( 'smw_qi', CKEDITOR.basePath + 'plugins/smwqueryinterface/' );
CKEDITOR.plugins.addExternal( 'smw_toolbar', CKEDITOR.basePath + 'plugins/smwtoolbar/' );
extraPlugins += ",smw_qi,smwtoolbar";
qiButton = 'SMWqi';
stbButton = 'SMWtoolbar';
}
// DataImport extension
var wsButton;
if ( ('SMW_DI_VERSION').InArray(window.parent.wgCKeditorUseBuildin4Extensions) || showTbButton) {
CKEDITOR.plugins.addExternal( 'smw_webservice', CKEDITOR.basePath + 'plugins/smwwebservice/' );
extraPlugins += ",smw_webservice";
wsButton = 'SMWwebservice';
}
// SemanticRule extension
if (('SEMANTIC_RULES_VERSION').InArray(window.parent.wgCKeditorUseBuildin4Extensions)) {
CKEDITOR.plugins.addExternal( 'smw_rule', CKEDITOR.basePath + 'plugins/smwrule/' );
extraPlugins += ",smw_rule";
}
// Richmedia extension
var rmButton;
if ( ('SMW_RM_VERSION').InArray(window.parent.wgCKeditorUseBuildin4Extensions) || showTbButton) {
CKEDITOR.plugins.addExternal( 'smw_richmedia', CKEDITOR.basePath + 'plugins/smwrichmedia/' );
extraPlugins += ",smw_richmedia";
rmButton = 'SMWrichmedia';
}
- Replace
['MWSpecialTags', 'MWTemplate', 'MWSignature', qiButton, wsButton, rmButton ],
[ stbButton ],
with
['MWSpecialTags', 'MWTemplate', 'MWSignature', 'qiButton', 'wsButton', 'rmButton' ],
[ 'stbButton' ],
2/ Fix: Indent function doesn't work
Open /WYSIWYG/ckeditor/plugins/mediawiki/plugin.js
Find these lines
if (sNodeName == 'p') {
try {
var style = htmlNode.getAttribute('style') || ,
alignment = style.match(/text-align:\s*(\w+);?/i);
if ( alignment[1].toLowerCase().IEquals("right", "center", "justify") ) {
this._AppendTextNode( htmlNode, stringBuilder, sNodeName, prefix);
return;
}
} catch (e) {};
}
Add after
if (sNodeName == 'p') {
try {
var style = htmlNode.getAttribute('style') || ,
alignment = style.match(/margin-left:\s*(\w+);?/i);
if ( alignment[1].toLowerCase().match("px") ) {
this._AppendTextNode( htmlNode, stringBuilder, sNodeName, prefix);
return;
}
} catch (e) {}; }
Hope this helps. Congminh1709 (talk) 07:23, 15 January 2013 (UTC)
- Thanks! helped alot Straumli (talk) 09:01, 18 February 2013 (UTC)
- @Congminh1709
- Can please give some more details, what kind of indent problems this fix solves ?
- Is this only a problem on IE ?
- I made also some fixes on the indent issue, but my approach was totally different. I fixed the conversion from html to mediawiki in WYSIWYG/ckeditor/_source/plugins/mediawiki/plugin.js Wingsofcourage (talk) 16:13, 20 February 2013 (UTC)
- @Wingsofcourage , did you post your fix somewhere ? We are actually struggling with this on IE8, and we may be working on a fix that would be similar to yours... Walrusse (talk) 19:21, 22 February 2013 (UTC)
- Try that in ckeditor/_source/plugins/mediawiki/plugin.js
case 'dl' :if(stringBuilder[stringBuilder.length - 1] !== '\n'){stringBuilder.push('\n');}this._AppendChildNodes( htmlNode, stringBuilder, prefix );break;case 'dt' :if(this.inList){stringBuilder.push(this.listType);}stringBuilder.push( ';' );this._AppendChildNodes( htmlNode, stringBuilder, prefix + ";" );if(htmlNode.nextSibling && (htmlNode.nextSibling.nodeName.toLowerCase() === 'dd' || htmlNode.nextSibling.nodeName.toLowerCase() === 'dt')){stringBuilder.push( '\n' );}break;case 'dd' :if(this.inList){stringBuilder.push(this.listType);}stringBuilder.push( prefix + ':' );this._AppendChildNodes( htmlNode, stringBuilder, prefix + ":" );if(htmlNode.nextSibling && (htmlNode.nextSibling.nodeName.toLowerCase() === 'dd' || htmlNode.nextSibling.nodeName.toLowerCase() === 'dt')){stringBuilder.push( '\n' );}break;Wingsofcourage (talk) 10:27, 27 February 2013 (UTC)- The Fix above don't fix the indent problem complete. It fix only the problem, that well formed Wiki text don't be changed during editing in Visual Editor.
- My fix will create a list of <dd> and <dl> tags. works fine ... but these changes can't be changed within the visual editor.
- The visual editor create <p style="margin-left: 400px;"> tag. For each indent 40px. This works also in ckeditor 4.
- The Problem that the indent if not in a <ul> or <ol> tag is lost after safe is still there.
- At the moment i think, that the approach from Congminh1709 is right. but must be extended with the margin-left.
- Working on that. Wingsofcourage (talk) 15:38, 6 March 2013 (UTC)
- Hello!
- (I'm French, sorry for my poor english)
- I Working on a Bridge under the CMS "Joomla" and the "MediaWiki".
- Your new version works perfectly inside the MW-1.20.3,
- but i found some Bugs in the file "WYSIWY.php" that can produce errors with 3rd parties...
- WYSIWY.php:L-76:
global $wgAjaxExportList; $wgAjaxExportList[] = ... - WYSIWY.php:L-99:
global $wgAutoloadClasses; $wgAutoloadClasses['CKEditor'] = ... - WYSIWY.php:L-119:
global $wgHooks; $wgHooks['ParserAfterTidy'][] = ... - WYSIWY.php:L-139:
global $wgDefaultUserOptions; $wgDefaultUserOptions['riched_use_toggle'] = ... - WYSIWY.php:L-148:
global $wgEditPageFrameOptions; $wgEditPageFrameOptions = ... - Line in order of this changes...
- Wish that helpfull... Godvicien (talk) 15:23, 18 March 2013 (UTC)
- @Wingsofcourage , did you post your fix somewhere ? We are actually struggling with this on IE8, and we may be working on a fix that would be similar to yours... Walrusse (talk) 19:21, 22 February 2013 (UTC)
- @Congminh1709
- I applied the fix above but it will work only if there are two '' added in the third line. No space between them!
if (sNodeName == 'p') {try {var style = htmlNode.getAttribute('style') || '',alignment = style.match(/margin-left:\s*(\w+);?/i);if ( alignment[1].toLowerCase().match("px") ) {this._AppendTextNode( htmlNode, stringBuilder, sNodeName, prefix);return;}} catch (e) {}; }Hpschry (talk) 11:40, 1 June 2013 (UTC)- Addendum: MW 1.19.7 Hpschry (talk) 12:11, 1 June 2013 (UTC)
Are there any plans for patches / updates for MW 1.20?
[edit]I've just upgraded and trying to get a WYSIWYG editor on board for my colleagues, but my wiki doesn't show up after installing the extension... Help or alternatives would be greatly appriciated... 130.220.71.26 01:18, 24 January 2013 (UTC)
Future of this extension ?
[edit]Hi
I'm just a user of this very useful extension and I’m willing to publish my fixes. I see a lot of very useful fixes here on the talk page mostly from unknown IP's. But there are a lot of different code streams. The ontoprise GmbH who developed this extension was crashed and the web site smwplus.net is down since months.
- Are there any concerns here to start a regular mediawiki extension ?
- And i mean only the Visual editor part without the halo or semantic media wiki extension. Wingsofcourage (talk) 14:20, 18 February 2013 (UTC)
- You would make allot of people very happy if you could pick up supporting this extension! Straumli (talk) 14:43, 18 February 2013 (UTC)
- Would it be possible to just set a github repository for the code (or mediawiki git repository), it would become much simpler for people to interact and patch things up. Walrusse (talk) 18:21, 19 February 2013 (UTC)
- Sure, why not! Most extensions already use git. it just this extension is discontinued due to bankruptcy of the previous maintainers and nobody took over. Straumli (talk) 14:28, 20 February 2013 (UTC)
- That was my originally intention. Make it possible to check in fixes made by different users without upload the hole extension to a different place.
- Second intention was the move to ckeditor version 4.
- @Straumli
- I saw your modification for mediawiki 1.20. Can you explain the changes a little bit more in detail ?
- The question here is: Do we need a separate folder for each mediawiki version ? Wingsofcourage (talk) 16:09, 20 February 2013 (UTC)
- Applied FIX1 of "Congminh1709 (talk)07:23, 15 January 2013" post. Mainly some fixes to tags not properly enclosed in quotes in /ckeditor/config.js. I skipped the indent part. i am afraid we might need a separate package per mediawiki/PHP combination. Straumli (talk) 07:20, 21 February 2013 (UTC)
- So, do we try to push it on Gerrit, or just open a "temporary" github repository fast so we can start making sense of modifications more easily (or stay on github for that matter...). Walrusse (talk) 15:59, 21 February 2013 (UTC)
- I think it may help to start it right in the Gerrit git repository. Because it helps with different mediawiki versions a lot. So we don't need to build a separate infra structure for it.
- I just created my mediawiki developer account. Therefore i can't tell you how long it will take to bring it online.
- May be that someone else can speed it up ? Wingsofcourage (talk) 16:25, 21 February 2013 (UTC)
- git repository on gerrit is requested. see Git/New_repositories/Requests Wingsofcourage (talk) 17:12, 21 February 2013 (UTC)
- Git Repository is settled.
- I try to upload a first version for mediawiki 1.17 first.
- Development is now open for any mediawiki developer.
- See https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fextensions%2FWYSIWYG.git;a=summary Wingsofcourage (talk) 08:37, 5 March 2013 (UTC)
- Any updates to the plan to further develop this extension? CarlosFutureDay (talk) 08:53, 11 September 2013 (UTC)
- The provided link didn't seem to work anymore, but I did notice that it has moved to a slightly different url at:
- http://git.wikimedia.org/summary/mediawiki%2Fextensions%2FWYSIWYG.git
- I've also noticed that Ciges in a later post has provided a GitHub repository too. Perhaps both these repositories should be mentioned on the main-page, so other developers that want to join in with your efforts can easily track down these repos (will be easier than hunting them down within the talk/discussion page). I'll make an edit to the main page now for this. Gurce (talk) 06:40, 3 January 2014 (UTC)
- git repository on gerrit is requested. see Git/New_repositories/Requests Wingsofcourage (talk) 17:12, 21 February 2013 (UTC)
- Sure, why not! Most extensions already use git. it just this extension is discontinued due to bankruptcy of the previous maintainers and nobody took over. Straumli (talk) 14:28, 20 February 2013 (UTC)
Working version for MW v1.20.2
[edit]The download on the main page did not work for me, feel free to download this version Works on MW v1.20.2, PHP 5.4.8 on Chrome + IE browsers Straumli (talk) 07:46, 19 February 2013 (UTC)
- Hi Sraumli, your version works okay but...
1. adding images is now glitchy (display size in WYSIWIG is full size not thumbnail), and height and width labels are deleted.2. the 'add image' popup resizes when searching for images3. The parser scrambles links the default links on the install to Manual: by adding [[]] infinitely.- I upgraded to 5.4.11 from 5.3.2 and am working on a clean install of 1.20.2
- The default downloads from the extension page seem to all have bugs in some form.
- Can we get someone to upload a 1.20 version with the above fixes? The myriad of patches is very confusing.
- MJ 65.95.81.89 19:08, 2 March 2013 (UTC)
- >The myriad of patches is very confusing.
- That's what i want to consolidate. @see "Future of this extension" Wingsofcourage (talk) 08:28, 5 March 2013 (UTC)
- Great Idea to consolidate!
- I've reverted back to using a clean install of 1.7 editor from the extension page, using the 1.17.0 WikiMedia Install.It works very well to my relief, with the one bug of neededing to click on dropdown menus or right click twice and 'wait', then click again in order to have the menus appear. Almost as if it isn't loaded initially. Works perfectly in Chrome.
- Is there a place to consolidate bug reports?
- Looking forward to a clear code stream to follow. :)
- MJ 38.116.202.64 19:16, 6 March 2013 (UTC)
- Hi Sraumli,
- Your version works for me on Firefox, but on IE8 clicking on Show preview/Safe page/Show WikiTextEditor blanking the page if page have a table. Off/on compatibility view doesn't help.
- Plase advice,
- Thanks
- Update: this is from old release of your WYSIWYS, bag fixed in 1.17. But v 1.17 with patches for MW1.19 have too many other issues for me in MV1.20 Andrey 14:13, 6 March 2013 (UTC)
- Hello!
- (I'm French, sorry for my poor english)
- I Working on a Bridge under the CMS "Joomla" and the "MediaWiki".
- Your new version works perfectly inside the MW-1.20.3,
- but i found some Bugs in the file "WYSIWY.php" that can produce errors with 3rd parties...
- WYSIWY.php:L-76:
global $wgAjaxExportList; $wgAjaxExportList[] = ... - WYSIWY.php:L-99:
global $wgAutoloadClasses; $wgAutoloadClasses['CKEditor'] = ... - WYSIWY.php:L-119:
global $wgHooks; $wgHooks['ParserAfterTidy'][] = ... - WYSIWY.php:L-139:
global $wgDefaultUserOptions; $wgDefaultUserOptions['riched_use_toggle'] = ... - WYSIWY.php:L-148:
global $wgEditPageFrameOptions; $wgEditPageFrameOptions = ... - Lines in order of this changes...
- Wish that helpfull...
Godvicien (talk) 15:25, 18 March 2013 (UTC)- Can you describe concerns a little bit more in detail.
- May be also in french on my talk page. Wingsofcourage (talk) 10:59, 20 March 2013 (UTC)
- I had issues with pages blanked in IE 8 with WYSIWIG 1.7.0 (linuxmatter), downloaded from the extensions page. The issues happened reproducibly when inserting unordered or ordered lists. The blank pages were obviously caused by ckeditor inserting data-cke-expando attributes to new nodes. These must obviously be removed from the html before converting it to wiki text. I inserted the following in /extensions/WYSIWYG/ckeditor/plugins/mediawiki/plugin.js:
ieFixHTML: function(html, convertToLowerCase){var zz = html;var z = zz.match(/<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>/g);// In IE, we need to remove the expando attributes.zz = zz.replace( /\s+data-cke-expando=".*?"/g, );- The last line is the inserted one. Actually this line was copied from another piece of source of ckeditor. Hpschry (talk) 11:56, 1 June 2013 (UTC)
- For some reason the empty quotes didn't show up in the code. It should be:
// In IE, we need to remove the expando attributes.zz = zz.replace( /\s+data-cke-expando=".*?"/g, '' );Kchurch05 (talk) 20:40, 8 October 2013 (UTC)- I have same problem, but added the line, still the same. What else I need to do to fix that problem. Thanks. 76.253.78.21 15:26, 16 November 2013 (UTC)
- Fix abowe was not quite accurate, it should be like this:
- Riparap (talk) 16:32, 9 February 2014 (UTC)
ieFixHTML: function(html, convertToLowerCase){ var zz = html; zz = zz.replace( /\s+data-cke-expando=".*?"/g, '' ); //In IE8, we need to remove the expando attributes. var z = zz.match(/<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>/g); . . .
- I have same problem, but added the line, still the same. What else I need to do to fix that problem. Thanks. 76.253.78.21 15:26, 16 November 2013 (UTC)
Cancelling an edit causes a 404 page not found error due to the index dot php being removed from the URL
[edit]When I cancel an edit, the URL drops the index dot php causing a 404 page not found error. This is caused by the extension, and disabling it by commenting out the require once statement resolves the issue. Please advise. Using version 1.20.2 mediawiki. 72.37.171.156 15:03, 27 February 2013 (UTC)
- I'm having this problem as well. Does anyone have a suggestion for this, or have a link where we can fix this?
- MediaWiki version: 1.20.2
- PHP version: 5.4.11
- MySQL version: 5.5.29 Ray1again (talk) 20:58, 11 April 2013 (UTC)
- I also have exactly the same problem.
- Mediawiki: 1.20.4
- PHP 5.3.2
- MySQL 5.1.67
- WYSIWYG extension (version 1.5.6_0 [B551], CKEditor 3.6 (revision 6902))
- Is this bug acknowledged and will a fix be released soon?
- Regards.
- J. 193.54.131.2 11:42, 26 April 2013 (UTC)
- Any solution to this cancel edit issue yet, it's annoying due to one small problem i cannot use WYSIWYG editor. 223.27.128.66 08:07, 4 July 2013 (UTC)
- Also having this problem. I'm sure somewhere within the WYSIWYG php files or js files the syntax for the link was programmed incorrectly. Searching for it myself, but it would be nice if the developer had a quick fix. 66.7.112.4 19:16, 11 July 2013 (UTC)
- Not only does this affect the cancel button, but it affects the EDIT links too. I've noticed that it has taken the index.php?title= and &action=edit out of the URL. I don't think we can get this to work without the developer's help. 66.7.112.4 19:56, 11 July 2013 (UTC)
- Yeah I can't get this to work with pretty URLs either. Instead of using index.php?title= or redirecting to /wiki when you click cancel it sticks with /w and gives a 404 page. 109.152.173.135 22:06, 1 August 2013 (UTC)
- There are two buggy lines in the CKeditorLinker::removeHook() function which prevent the extension's parse() function from removing its own hooks. This causes the hooks to continue to run and modify links when the rest of the page is rendered, in addition to what's in the WYSIWYG editor. A couple of simple edits in WYSIWYG/CKeditorLinker.php seem to fix the problem. For me, they're lines 48 and 49, but I'll include the whole function here (starting on line 44):
- Change this:
private static function removeHook($hookName, $function) {global $wgHooks;$hook = $wgHooks[$hookName];$i = array_search($function, $hook);if ($i) {$wgHooks[$hookName] = array_splice($hook, $i, 1);}}- To this:
private static function removeHook($hookName, $function) {global $wgHooks;$hook = $wgHooks[$hookName];$i = array_search($function, $hook);if ($i !== FALSE) {array_splice($wgHooks[$hookName], $i, 1);}}12.14.13.130 16:25, 28 October 2013 (UTC)- I can confirm the above fix works in 1.21.1, with WYSIWYG version (Version 1.5.6_0 [B551], CKEditor 3.6 (revision 6902) 12.226.154.98 19:04, 26 November 2013 (UTC)
- Yeah I can't get this to work with pretty URLs either. Instead of using index.php?title= or redirecting to /wiki when you click cancel it sticks with /w and gives a 404 page. 109.152.173.135 22:06, 1 August 2013 (UTC)
- Not only does this affect the cancel button, but it affects the EDIT links too. I've noticed that it has taken the index.php?title= and &action=edit out of the URL. I don't think we can get this to work without the developer's help. 66.7.112.4 19:56, 11 July 2013 (UTC)
- Also having this problem. I'm sure somewhere within the WYSIWYG php files or js files the syntax for the link was programmed incorrectly. Searching for it myself, but it would be nice if the developer had a quick fix. 66.7.112.4 19:16, 11 July 2013 (UTC)
- Any solution to this cancel edit issue yet, it's annoying due to one small problem i cannot use WYSIWYG editor. 223.27.128.66 08:07, 4 July 2013 (UTC)
Not loading initially in I.E. 8
[edit]Hi everyone,
I've been testing and patching this extension on 1.19 and 1.20 and I get the following error:
On I.E. 8 using PHP 5.3.21
- the editor doesn't load, you still see the default wiki tools. - refresh doesn't load the extension. - clicking 'edit' AGAIN loads it and it works fine.
The extension works fine on chrome.
Any code that I need to focus on to make sure it loads? Or is it my version of PHP and I should just upgrade?
Thanks! MJ 38.116.202.64 21:01, 28 February 2013 (UTC)
- Try to upgrade your PHP. See comment from Straumli.
- >The download on the main page did not work for me, feel free to download this version Works on MW v1.20.2, PHP 5.4.8 on Chrome + IE browsers Wingsofcourage (talk) 12:11, 1 March 2013 (UTC)
- Thanks for the reply, I upgraded to 5.4.11 and tried Staumli's patch again. (I had tried it before).
- It works well, comes up in IE 8 but..
1. adding images is now glitchy (display size in WYSIWIG is full size not thumbnail)2. add image dialogue resizes when searching for images3. The parser scrambles links the default links on the install to Manual: by adding [[]] infinitely.- I've also tried to apply @DheerajKumarBit's patch but frustratingly, the links from the main page 1.7.0-1 lack a CKeditorLinker.php file to patch. Odd.
- If anyone has a versions working perfectly on specific configurations, should we not organise them for everyone's sanity? I'll install any MediaWiki version at this point.
- Hoping for the best!
- MJ 65.95.81.89 02:38, 3 March 2013 (UTC)
There's the new "official" Version of MediaWiki-1.20.3
[edit]Hello ! --Godvicien (talk) 11:21, 22 March 2013 (UTC)
There's a new official version of MediaWiki-1.20.3 that is fully debugged for security, see at : Download Godvicien (talk) 11:21, 22 March 2013 (UTC)
Found some issues in the very good User-update-version !
[edit]Hello!
(I'm French sorry for my poor english)
I develop a bridge between the CMS=Joomla and the MediaWiki that fill a iframe of my Joomla Website in development... I use and test very often your Extension : "WYSIWYG User Update :-)", and i have found some issues that i have corrected only into MY version of WYSIWYG-CKEditor.
I'm using this config:
Apache=2.2.22
MySQL=5.5.24
PHP=5.4.3
MediaWiki=1.20.3
WYSIWYG=User-Update latest version
The first issues is about the $Global variables that must be declared with a global prefix when used/affected inside the code, and this bugs are located in the "/WYSIWYG/WYSIWYG.php" File, with Lines in order of this changes :
L-076=" * Enable use of AJAX features."
L-077=" */"
L-078="global $wgAjaxExportList;" //This Line to add
L-079="require_once('CKeditorSajax.body.php');"
...
L-097="// Autoloadable classes"
L-098="global $wgAutoloadClasses;" //This Line to add
L-099="$dir = dirname( __FILE__ ) . '/';"
...
L-118="// Hooked functions"
L-119="global $wgHooks;'" //This Line to add
L-120="$wgHooks['ParserAfterTidy'][] = ...
...
L-138="// Defaults for new preferences options"
L-139="global $wgDefaultUserOptions;" //This Line to add
L-140="$wgDefaultUserOptions['riched_use_toggle'] = 1;"
...
L-147="if (defined('SMW_HALO_VERSION')) {"
L-148=" global $wgEditPageFrameOptions;" //This Line to add
L-149=" $wgEditPageFrameOptions = 'SAMEORIGIN';
...
Segundo, this is about the File : "MW/Extensions/WYSIWYG/ckeditor/plugins/mediawiki/plugin.js"
The issues concern the js: "window.parent" that return the 'window' if there is no-parent, then this have no visible bugs... But in my case of an iframe containing the "Wiki-WYSIWYG", the "window.parent" return another object insted of the 'window', and there are some bugs in my js console errors, and in the running of my WYSIWYG extension.
For debugging this issues in this file plugin.js: I have replaced all occurrences in this file : "window.parent." =BY=> "window.".
That all for the moment.
I'wish that helps You...
Frenchie's Godvicien Godvicien (talk) 18:06, 24 March 2013 (UTC)
MW v1.20.3: Adding HTTP links works OK, NEWS and FTP get broken and become internal links
[edit]Using MW v1.20.3 with the newest user patched version https://docs.google.com/file/d/0B-aiZzKTmWI2bG8yVzBCOWNLamM/view.
When adding a link to "http://www.blah.org" everything works fine. When doing the same with "news://news.blubb.org" or "ftp://ftp.meh.org" first the dialogue mentions "external link... no search for it", which looks fine. But when saving or previewing (or just changing to the WikiTextEditor) the link goes to an internal page called "Ftp:ftp://ftp.blubb.com".
Even if you manually type text like ftp://ftp.blubb.com on a page with the WikiTextEditor, as soon as you change to the RichTextEditor it gets changed to [[Ftp:ftp://ftp.blubb.com|ftp://ftp.blubb.com]]...
Any idea what is causing this and how to work around it? 79.219.157.113 17:53, 7 April 2013 (UTC)
- Hmmmm seems like Ftp with capital "F" works... 79.219.157.113 22:45, 7 April 2013 (UTC)
Create Category Button? ✔
[edit]Is it possible to do a simple edit or for someone to add to the new community release a button for creating categories?
This was previously only possible with the Halo extension, which is now defunct along with SMW+. 64.122.45.178 21:15, 9 April 2013 (UTC)
- +1. I think a button listing the existing categories/possibility to create new ones could improve the user experience with the editor. 84.233.177.18 10:23, 26 July 2013 (UTC)
- +2 agreed - I'm going to find it tricky to roll out as we use RequireCategory (turned off for section editing) and CategorySuggest, which work well together to ensure all pages have one. However the categorysuggest doesn't work with the editor, failing to pick up existing categories (and is buggy with multiple categories) so an interface on the editor showing existing categories and allowing addition/removal/search would be an excellent alternative. Hoggle42 (talk) 15:19, 20 November 2013 (UTC)
- +3. If found a way to add a button to add/edit references (footnotes), just copying and adapting the existing code. But I think I won't be able to make a dialog searching in existing categories, and that enables to add and retrieve categories... Varlin (talk) 23:18, 30 December 2013 (UTC)
- Category is not the same thing as footnote (reference).
- Btw, I have done further modifications with the reference functions you provided in my own installation of MW, see Extension_talk:WYSIWYG#Buttons_to_add.2Fedit_references_.3Cref.3E.3C.2Fref.3E_37609 Riparap (talk) 19:06, 4 January 2014 (UTC)
- Yes I know, I was meaning that the tweak about the ref button could be a step forward a category button (in terms of code used). Wasn't clear ! But the categories btn is more complicated. What could possibly be used is the categories button that existed in fckeditor. But I believe a big part of the code has been changed since then. Varlin 21:48, 5 January 2014 (UTC)
- I was able to mimic your ref dialog for a simple category definition dialog. I am not sure if the html code created by this is 100% right, it seems to work anyway... do you have any comments / more info about html syntax with category definition ?
- I can post all modifications after somebody has confirmed the rules and formats of the html syntax...
- Riparap (talk) 14:01, 7 January 2014 (UTC)
Code of simple category.js dialog was removed here, because there is more advanced dialog below.
- Thanks, it works for me. Varlin (talk) 22:27, 8 January 2014 (UTC)
- I created another more advanced dialog where you will get list of existing categories on selection list,
- it is based on dialogs/link.js. However there are few issues:
- I do not understand all the old code of "onShow" trigger :) so I am not sure if something must be still commented out or restored back into use. There are also some other places in code which I am not 100% how code should be modified. I tried to remove all replace functions of characters anyway.
- Updating list of categories immediatedly when dialog is entered is accomplished by adding trigger "onChange: OnCategoryChange" into "id: 'categoryValue'". If existing category element is double clicked, list will contain same value as is in categoryValue -box. When dialog is opened, is there a way to call function to update list with all category values? ...I could not find a way to do it :(
- I have modified funtion wfSajaxSearchCategoryCKeditor in file CKeditorSajax.body.php to support input parameter. ...was this editing allowed? In my MW, function was not called anywhere at all before.
- WYSIWYG/CKeditorSajax.body.php:
function wfSajaxSearchCategoryCKeditor( $term ){ //09.01.14 RL $term added global $wgContLang; //09.01.14 $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) ); //09.01.14 $ns = NS_CATEGORY; //=14 $dbr = wfGetDB( DB_SLAVE ); /** @todo FIXME: should use Database class */ //09.01.14 -> $term1 = $wgContLang->ucfirst( $term ); $term2 = $wgContLang->lc( $term ); $term3 = $wgContLang->uc( $term ); $term4 = $wgContLang->ucfirst( $term2 ); $term = $term1; if( $term != "" ) { // $search will be added to mysql query string below $searchr = "AND ( tmpSelectCat1.cl_to LIKE '%".$dbr->strencode( $term1 )."%' ". "OR (LOWER(CONVERT(tmpSelectCat1.cl_to, CHAR)) LIKE '%".$dbr->strencode( $term2 )."%') ". "OR (UPPER(CONVERT(tmpSelectCat1.cl_to, CHAR)) LIKE '%".$dbr->strencode( $term3 )."%') ". "OR (tmpSelectCat1.cl_to LIKE '%".$dbr->strencode( $term4 )."%') ". ") "; } else { $searchr = ""; } //09.01.14 <- $m_sql = "SELECT tmpSelectCat1.cl_to AS title FROM ".$dbr->tableName('categorylinks')." AS tmpSelectCat1 ". "LEFT JOIN ".$dbr->tableName('page')." AS tmpSelectCatPage ON ( tmpSelectCat1.cl_to = tmpSelectCatPage.page_title ". "AND tmpSelectCatPage.page_namespace =$ns ) ". "LEFT JOIN ".$dbr->tableName('categorylinks')." AS tmpSelectCat2 ON tmpSelectCatPage.page_id = tmpSelectCat2.cl_from ". "WHERE tmpSelectCat2.cl_from IS NULL ". $searchr." ". //14.01.14 "GROUP BY tmpSelectCat1.cl_to"; $res = $dbr->query( $m_sql, __METHOD__ ); $ret = ''; $i = 0; while ( ( $row = $dbr->fetchObject( $res ) ) ) { $ret .= $row->title . "\n"; $sub = explode( "\n", wfSajaxSearchCategoryChildrenCKeditor( $row->title ) ); foreach( $sub as $subrow ) if( strlen( $subrow ) > 0 ) $ret.= ' ' . $subrow . "\n"; } return $ret; }
- WYSIWYG/ckeditor/plugins/mediawiki/plugin.js:
// category categorybtn : 'Add/edit category', categoryTitle : 'Add/edit category and sort key', //07.01.14 category : 'Category: (empty field=>list all categories)', //07.01.14 categorySort : 'Sortkey within category', //07.01.14 noCategoryFound : 'Not found, category is new', //09.01.14 oneCategoryFound : 'One category found', //09.01.14 manyCategoryFound : ' categories found', //09.01.14 selfromCategoryList : 'Select from list of categories:' //09.01.14
- Code of WYSIWYG/ckeditor/plugins/mediawiki/dialogs/category.js with selection list of existing categories (it works but may require some fine tunig based on issues listed abowe):
// // File: WYSIWYG/ckeditor/plugins/mediawiki/dialogs/category.js // // Versions: // 08.01.14 RL More advanced dialog based on link.js, selection list for existing categories // CKEDITOR.dialog.add( 'MWCategory', function( editor ) { { // need this to use the getSelectedLink function from the plugin var plugin = CKEDITOR.plugins.link; var searchTimer; var OnCategoryChange = function() { var dialog = this.getDialog(); var StartSearch = function() { var e = dialog.getContentElement( 'mwCategoryTab1', 'categoryValue' ), value = e.getValue().Trim(); //Commented out to get list of categories when dialog is opened. //if ( value.length < 1 ) // return ; SetSearchMessage( editor.lang.mwplugin.searching ) ; // Make an Ajax search for the categories. window.parent.sajax_request_type = 'GET' ; window.parent.sajax_do_call( 'wfSajaxSearchCategoryCKeditor', [value], LoadSearchResults ) ; } var LoadSearchResults = function ( result ) { var results = result.responseText.split( '\n' ), select = dialog.getContentElement( 'mwCategoryTab1', 'categoryList' ); ClearSearch() ; if ( results.length == 0 || ( results.length == 1 && results[0].length == 0 ) ) { SetSearchMessage( editor.lang.mwplugin.noCategoryFound ) ; } else { if ( results.length == 1 ) SetSearchMessage( editor.lang.mwplugin.oneCategoryFound ) ; else //List contains one extra line... .why ????? SetSearchMessage( results.length - 1 + editor.lang.mwplugin.manyCategoryFound ) ; for ( var i = 0 ; i < results.length ; i++ ) select.add ( results[i], results[i] ); //Is this correct???? //select.add ( results[i].replace(/_/g, ' '), results[i] ); } } var ClearSearch = function() { var e = dialog.getContentElement( 'mwCategoryTab1', 'categoryList' ); e.items = []; var div = document.getElementById(e.domId), select = div.getElementsByTagName('select')[0]; while ( select.options.length > 0 ) select.remove( 0 ) } var SetSearchMessage = function ( message ) { var e = dialog.getContentElement( 'mwCategoryTab1', 'searchMsg' ); e.html = message; document.getElementById(e.domId).innerHTML = message; } var e = dialog.getContentElement( 'mwCategoryTab1', 'categoryValue' ); var category = e.getValue().Trim(); if ( searchTimer ) window.clearTimeout( searchTimer ) ; //Commented out to get list of categories when dialog is opened. //if ( category.length < 1 ) { // ClearSearch() ; // SetSearchMessage( editor.lang.mwplugin.startTyping ) ; // return ; //} SetSearchMessage( editor.lang.mwplugin.stopTyping ) ; searchTimer = window.setTimeout( StartSearch, 500 ) ; } var CategorySelected = function() { var dialog = this.getDialog(), target = dialog.getContentElement( 'mwCategoryTab1', 'categoryValue' ), select = dialog.getContentElement( 'mwCategoryTab1', 'categoryList' ); //target.setValue(select.getValue().replace(/_/g, ' ')); target.setValue(select.getValue()); } var loadElements = function( editor, selection, element ) { var category = null; var sortkey = null; element.editMode = true; //Get values of category and sort key category = element.getText(); sortkey = element.getAttribute('sort'); //Default sort key is category name => display only category if (category == sortkey) sortkey = null; if ( category.length > 0 ) this.setValueOf( 'mwCategoryTab1','categoryValue', category ); else this.setValueOf( 'mwCategoryTab1','categoryValue', "" ); if ( sortkey.length > 0 ) this.setValueOf( 'mwCategoryTab1','sortkeyValue', sortkey ); else this.setValueOf( 'mwCategoryTab1','sortkeyValue', "" ); } return { title : editor.lang.mwplugin.categoryTitle, //'Add/modify category' minWidth : 350, minHeight : 500, resizable: CKEDITOR.DIALOG_RESIZE_BOTH, contents : [ { id : 'mwCategoryTab1', label : 'Add category', title : 'Add category', elements : [ { id: 'categoryValue', type: 'text', label: editor.lang.mwplugin.category, title: 'Write name of category', style: 'border: 1px;', onKeyUp: OnCategoryChange, onChange: OnCategoryChange // ^---onChange was the only way to get list of categories updated when dialog was opened. // Is there better way to do initial update of category list??? }, { id: 'searchMsg', type: 'html', style: 'font-size: smaller; font-style: italic;', html: editor.lang.mwplugin.startTyping }, { id : 'sortkeyValue', type : 'text', label : editor.lang.mwplugin.categorySort, title : 'Sort key', style: 'border: 1px;', setup: function(element){ this.setValue(element.getAttribute('sortkeyValue')); } }, { id: 'categoryList', type: 'select', size: 25, label: editor.lang.mwplugin.selfromCategoryList, //'Select from list of existing categories:' title: 'Category list', required: false, style: 'border: 1px; width:100%;', onChange: CategorySelected, items: [ ] } ] } ], onOk : function() { //var editor = this.getContentElement( 'mwCategoryTab1', 'categoryValue'), // link = editor.getValue().Trim().replace(/ /g, '_'), // attributes = {href : link, _cke_saved_href : link}; var editor = this.getParentEditor(); var category = this.getValueOf( 'mwCategoryTab1', 'categoryValue' ).Trim(); var sortkey = this.getValueOf( 'mwCategoryTab1', 'sortkeyValue' ).Trim(); //Build html syntax fox category like this: // <span> class="fck_mw_category" sort="CName">Sort</span> // <span> _fcknotitle="true" class="fck_mw_category" sort="CName">CName</span> if ( category.length > 0 ) { var realElement = CKEDITOR.dom.element.createFromHtml('<span></span>'); //User gave only name of category => set sort key to same value if ( sortkey.length == 0 ) sortkey = category; //Name FCK class for category element. realElement.setAttribute('class','fck_mw_category'); //Is rule for this attribute right? //...wikitext to html conversion seems to work like this if ( sortkey == category ) realElement.setAttribute('_fcknotitle','true'); if ( sortkey.length > 0 ) realElement.setAttribute('sort',sortkey); //Name of category if ( category.length > 0 ) realElement.setText(category); //Are there any additional attributes used by html format??? var fakeElement = editor.createFakeElement( realElement , 'FCK__MWCategory', 'span', false ); editor.insertElement(fakeElement); } }, onShow : function() { /* This block is original code from link.js, and is unchanged, is this needed here or not ????*/ // clear old selection list from a previous call var editor = this.getParentEditor(), e = this.getContentElement( 'mwCategoryTab1', 'categoryList' ); e.items = []; var div = document.getElementById(e.domId), select = div.getElementsByTagName('select')[0]; while ( select.options.length > 0 ) select.remove( 0 ); e = this.getContentElement( 'mwCategoryTab1', 'searchMsg' ); var message = editor.lang.mwplugin.startTyping; e.html = message; document.getElementById(e.domId).innerHTML = message; /**** Original code from link.js, is this needed here or not???? ****** this.fakeObj = false; var selection = editor.getSelection(), element = null; // Fill in all the relevant fields if there's already one link selected. if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) ) selection.selectElement( element ); else if ( ( element = selection.getSelectedElement() ) && element.is( 'img' ) ) { if ( element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ) { this.fakeObj = element; element = editor.restoreRealElement( this.fakeObj ); selection.selectElement( this.fakeObj ); } else { selection.selectElement( element ); } } var href = ( element && ( element.getAttribute( '_cke_saved_href' ) || element.getAttribute( 'href' ) || element.getAttribute('link') ) ) || ''; if (href) { var e = this.getContentElement( 'mwLinkTab1', 'linkTarget'); e.setValue(href); } this._.selectedElement = element; ******************************/ /*This was taken from first simple dialog for category definitions.*/ this.editObj = false; this.fakeObj = false; this.editMode = false; var selection = editor.getSelection(); var ranges = selection.getRanges(); var element = selection.getSelectedElement(); var seltype = selection.getType(); if ( seltype == CKEDITOR.SELECTION_ELEMENT && element.getAttribute( 'class' ) == 'FCK__MWCategory' ) { this.fakeObj = element; element = editor.restoreRealElement( this.fakeObj ); loadElements.apply( this, [ editor, selection, element ] ); selection.selectElement( this.fakeObj ); } else if ( seltype == CKEDITOR.SELECTION_TEXT ) { this.setValueOf( 'mwCategoryTab1','categoryValue', selection.getNative() ); } this.getContentElement( 'mwCategoryTab1', 'categoryValue' ).focus(); } } } } );
- Riparap (talk) 09:20, 9 January 2014 (UTC)
- There was "[object Object]" error with IE when entering dialog. Now in case user has selected some text and then selects button "Category", text is passed into dialog properly also with IE.
- This dialog is included in #6 bundle. Riparap (talk) 19:13, 27 February 2014 (UTC)
- Is it possible to show/hide the category button in the wysiwyg toolbar based on the logged in user group? that is, i want bureaucrat only to show the category icon. For others, it should be disabled/hidden. Hari Chitra (talk) 02:43, 13 May 2016 (UTC)
- Thanks, it works for me. Varlin (talk) 22:27, 8 January 2014 (UTC)
- Yes I know, I was meaning that the tweak about the ref button could be a step forward a category button (in terms of code used). Wasn't clear ! But the categories btn is more complicated. What could possibly be used is the categories button that existed in fckeditor. But I believe a big part of the code has been changed since then. Varlin 21:48, 5 January 2014 (UTC)
- +3. If found a way to add a button to add/edit references (footnotes), just copying and adapting the existing code. But I think I won't be able to make a dialog searching in existing categories, and that enables to add and retrieve categories... Varlin (talk) 23:18, 30 December 2013 (UTC)
- +2 agreed - I'm going to find it tricky to roll out as we use RequireCategory (turned off for section editing) and CategorySuggest, which work well together to ensure all pages have one. However the categorysuggest doesn't work with the editor, failing to pick up existing categories (and is buggy with multiple categories) so an interface on the editor showing existing categories and allowing addition/removal/search would be an excellent alternative. Hoggle42 (talk) 15:19, 20 November 2013 (UTC)
Mediawiki Image Search WYSIWYG
[edit]When I click the image icon to upload a Mediawiki image, under Image File Name if I enter a file that I have uploaded to mediawiki it says searching next to Automatic search results and just continues to search but never stops. I am using WYSIWYG 1.7.0_1 on mediawiki 1.17.5. Tima1187 (talk) 16:18, 30 April 2013 (UTC)
Editing Sections of a Page
[edit]Using Mediawiki 1.17.5 and WYSIWYG 1.7.0_1 when Editing sections of a page it adds a break before that section. The code for a break
and not just an actual break even though no break was specified. How can this be fixed? Tima1187 (talk) 16:19, 30 April 2013 (UTC)
Links in WYSIWYG error
[edit]When selecting "Choose an existing wiki page" it does not work, it just continuously says searching. I am running WYSIWYG 1.7.0_1 on Mediawiki 1.17.5 Tima1187 (talk) 16:20, 30 April 2013 (UTC)
Unable to use RichMedia Plugin says Fancybox is not a function
[edit]Hello, Im attempting to use the WYSIWYG Editor, and it shows up fine. I enable Richmedia and when i attempt to click the icon it says
"Timestamp: 6/13/2013 12:36:07 PM Error: TypeError: jQuery.fancybox is not a function Source File: http://mywebsite/extensions/WYSIWYG/ckeditor/plugins/smwrichmedia/plugin.js?t=B49E5BQ Line: 41"
note: i replaced my website url seen here, with the words mywebsite for privacy.
Line 30-41
var url = src + '&RMUpload[RelatedArticles]='+article+'&wpIgnoreWarning=true';
jQuery.fancybox({
'href' : url,
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
'overlayColor' : '#222',
'overlayOpacity' : '0.8',
'hideOnContentClick' : true });
}
}; 207.239.97.10 16:38, 13 June 2013 (UTC)
Unable to use RichMedia Plugin says Fancybox is not a function
[edit]Hello, Im attempting to use the WYSIWYG Editor, and it shows up fine. I enable Richmedia and when i attempt to click the icon nothing happens. I check the Error Console and it states the following:
"Timestamp: 6/13/2013 12:36:07 PM Error: TypeError: jQuery.fancybox is not a function Source File: http://mywebsite/extensions/WYSIWYG/ckeditor/plugins/smwrichmedia/plugin.js?t=B49E5BQ Line: 41"
note: i replaced my website url seen here, with the words mywebsite for privacy.
Line 30-41
var url = src + '&RMUpload[RelatedArticles]='+article+'&wpIgnoreWarning=true';
jQuery.fancybox({
'href' : url,
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
'overlayColor' : '#222',
'overlayOpacity' : '0.8',
'hideOnContentClick' : true });
}
};207.239.97.10 16:42, 13 June 2013 (UTC)
Yes: Working with MW-1.21+ with some settings
[edit]Hello!
Sorry for my poor English, I'm French...
I succeed to WISIWYG in latest version to work with MW-1.21.1, simply with this LocalSettings:
1] Comments the 2(+?) lines that have "wfLoadExtensionMessages" in "CKeditor.body.php".
2] Here are my LocalSettings that works:
//WYSIWYG:
<syntaxhighlight lang="PHP">
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); //By Texts (very old)
require_once("$IP/extensions/WYSIWYG/WYSIWYG.php");//Activation some for all extensions
$wgGroupPermissions['*']['wysiwyg'] = true;//Everyone can use (if can edit)...
$wgDefaultUserOptions['cke_show'] = 'richeditor';//Enable CKEditor
$wgDefaultUserOptions['riched_use_toggle'] = true;//Editor can toggle between CKEditor/WikiTextBox
$wgDefaultUserOptions['riched_start_disabled'] = false;//Important!!! else bug...
$wgDefaultUserOptions['riched_toggle_remember_state'] = true;//working/bug?)
$wgDefaultUserOptions['riched_use_popup'] = false;//Deprecated
3] Add these line into LocalSettings for exclude WISIWIG from this sections (not compatible):
$wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI;
$wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE;
Then needs to read the others threads of this forum to have helpful ;-) Godvicien (talk) 08:25, 15 June 2013 (UTC)
Edit: If you want and if developers here we can open a common SourceForge project with this Extension (I'm Web-developer)... If you are Web Developer, respond to this thread ! Godvicien (talk) 08:25, 15 June 2013 (UTC)
- Works for me too! Thanks! 91.3.200.76 12:58, 28 June 2013 (UTC)
- Works great! Thanks! 129.83.31.1 14:12, 15 July 2013 (UTC)
- It doesn't seem to work when editing in Internet Explorer though. I get a blank page... do you have any idea what to change? 138.11.0.153 20:25, 17 July 2013 (UTC)
- It worked fine for me with internet explorer 10.
- what version of IE are you using?
- also check your web server error logs. there may be a clue there 174.46.144.130 20:56, 18 July 2013 (UTC)
- I tried it with Chrome and it worked fine. I tried to do the same edit on IE8 and instead of storing my edit it stored nothing back into the whole section of the page I was editing. I tried it with IE10: that also threw away my changes and stored an empty section. Worse, when I tried to roll-back the edit on IE8, it put the entire page into edit mode and while it looked like it was all back in the Preview, when I saved the "undo" it blanked the entire Wiki page- so it even kills off the rollback ability.
- --Flint 134.134.137.75 23:29, 24 July 2013 (UTC)
- My IE8 does also empty the page when I save the page. But I do even get an empty page when I switch directly from WYSIWYG to the common text editor without changing a bit of the page.
- Does anybody have found any solution for that bug in the meantime? 194.25.45.16 15:21, 9 October 2013 (UTC)
- addition: switching to IE9 did not yield any improvement. Will try IE10 later on. 194.25.45.16 16:36, 9 October 2013 (UTC)
- Hi,
- Even I am facing issues with IE9. If I add any link (internal/external) then the whole linked text disappears as soon as I save the page or switch to text editor. I am using MW 1.21 and used the extension recommended on the page as well as made the changes suggested. It seems to be working properly with FireFox. Any idea what could be wrong? Amitk75mw (talk) 08:30, 3 December 2013 (UTC)
- addition: switching to IE9 did not yield any improvement. Will try IE10 later on. 194.25.45.16 16:36, 9 October 2013 (UTC)
- Works for me too. I found "wfLoadExtensionMessages" in my "CKeditor.body.php" on lines 345 and 532. 66.128.103.114 15:30, 19 July 2013 (UTC)
- Found only one expression in CKeditor.body.php.... 186.105.213.118 18:21, 26 July 2013 (UTC)
- wocao i can not understand what are talkking about 121.235.29.188 03:17, 25 July 2013 (UTC)
- Hello !
- Have you any issue with cancel button when you use this editor ?
- I can use it with your instructions (thanks !) but if i try to create a page (or edit) and after that, cancel action, i've an issue with url redirection.
- For example, if i try to edit home page and cancel it, i've this url : http://xxxx.com/Home instead of http://xxxx.com/index.php?title=Homme 217.19.202.58 07:39, 25 July 2013 (UTC)
- Dommage....
- Fatal error: Call to undefined method Parser::strip() in /XXXX/extensions/WYSIWYG/CKeditor.body.php on line 90
- Je n'ai trouvé qu'une expression wfLoadExtensionMessages 186.105.213.118 18:30, 26 July 2013 (UTC)
- Same problem here. Any hints? 188.154.56.77 19:24, 7 August 2013 (UTC)
- Has worked now after taking the given version from the download column in http://www.mediawiki.org/wiki/Extension:WYSIWYG. 188.154.56.77 19:35, 7 August 2013 (UTC)
- Same problem here. Any hints? 188.154.56.77 19:24, 7 August 2013 (UTC)
- Extension itself is working. I have noticed problem with inserting image ( wiki 1.21 ) one thing is that I have list of avaliable pictures, serch is wokring ok but when I'm selecting some picture I don't have preview, I have picture indicating that image file is unavaliable. If will select picture (even if I don't have preview) in content I have link to picture http://mydomain.com/extensions/WYSIWYG/ckeditor/skins/kama/images/noimage.png?t=B49E5BQ (mydomain is changed by me ;))
- Any ideas ?
- Thanks 81.144.199.142 08:16, 9 August 2013 (UTC)
- This instruction only works for a previous version of WYSIWYG (see Installation on Mediawiki 1.17.x to 1.20.x). Download link https://docs.google.com/file/d/0B-aiZzKTmWI2bG8yVzBCOWNLamM/view
- Does not work for WYSIWYG which 'Works on Mediawiki 1.21.1' . F123h (talk) 10:33, 27 August 2013 (UTC)
- hello.
- same problem with Mediawiki 1.21.1
- WYSIWYG is not work. Franck 09:49, 5 September 2013 (UTC)
- Hi. I need help. My version is 1.20.3. I installed this WYSIWYG extension. After installing, I saw it on Special:Version.
- But when I started to edit a page, I can see the editor is there but the icons or buttons are greyed out. And I cannot type in on the editor itself. Hope someone can help me on these. :( 03:22, 9 September 2013 (UTC)
- Hi. I need help. My version is 1.20.3. I installed this WYSIWYG extension. After installing, I saw it on Special:Version.
- But when I started to edit a page, I can see the editor is there but the icons or buttons are greyed out. And I cannot type in on the editor itself. Hope someone can help me on these. :( 03:22, 9 September 2013 (UTC)
- Great! Works like a charm :) Thanks a lot! 193.26.194.93 09:03, 19 September 2013 (UTC)
- Pilot testing with BitNami MW 1.21.2 under Windows.
- Looking good except that a links to non-standard file extensions pose a problem:
- [[Media:AnnualReport2013.pdf|Annual Report]]
- is replaced by
- [[/mediawiki/images/c/ca/AnnualReport2013.pdf|Annual Report]]
- which is interpreted as a non-existent page.
- Ooops - sorry this is addressed in another thread. My bad. DaPi (talk) 09:54, 30 September 2013 (UTC)
- I got a "Strict Standards: Declaration of CKeditorParserOptions::getSkin() should be compatible with ParserOptions::getSkin($title = NULL) in ...\extensions\WYSIWYG\CKeditorParserOptions.body.php on line 3". To fix it, I changed "function getSkin()" to "function getSkin( $title = null )" in CKeditorParserOptions.body.php (Line 7). Now it matches the getSkin() function in \includes\parser\ParserOptions.php, line 262. 50.126.86.211 23:02, 10 October 2013 (UTC)
- thanks very much. i got the same problem. 118.195.67.193 14:18, 20 October 2013 (UTC)
- thanks very much. i got the same problem. 118.195.67.193 14:18, 20 October 2013 (UTC)
- When I put the line with <syntaxhighlight lang="PHP"> into my LocalSettings.php file I can't load any page of the wiki. All I get is a blank page.
Without that line I can edit pages with firefox and ie10 (earlier ie versions empty the pages after saving) and the editor chews up all category lines. All category entries just disappear after saving the work! :( 194.25.45.16 17:29, 18 October 2013 (UTC)
- It works, thank you so much. I hope the WYSIWYG author release an update.
- Il fonctionne, je vous remercie beaucoup. J'espère que l'auteur de WYSIWYG libérer une mise à jour. 2.180.154.251 18:00, 2 December 2013 (UTC)
- Hello I tried everything and still doesnt work for me?. They told me there would be a popup for the wysiwyg editor. BNutit doesn't appear.
- What do I have to do ?? :( Doun (talk) 13:14, 4 August 2014 (UTC)
- You could perhaps try to modify following setting in LocalSettings.php (set value to "true"):
- $wgDefaultUserOptions['riched_use_popup'] = false; //Deprecated
- Based on comment in the end of that line, setting it to value "true" may not work properly at least with programs of #6 bundle of download section. Riparap (talk) 11:21, 2 September 2014 (UTC)
- You could perhaps try to modify following setting in LocalSettings.php (set value to "true"):
- Deux siècles plus tard,
- sur MediaWiki 1.24.1
- Après différentes installations (à partir de https://www.mediawiki.org/wiki/Extension:WYSIWYG ) qui ont toutes échoué, j'ai tenté l'install de Godvicien.
- Et pour le moment, elle échoue ici : Fatal error: Cannot access protected property OutputPage::$styles in /homepages/24/d535053617/htdocs/New node/extensions/WYSIWYG/CKeditor.body.php on line 194
- Alors je suis épuisé. Je me demande si WYSIWIG n'a pas un successeur digne de ce nom. J'ai fait quelques recherches mais en plus d'être épuisé, je suis malade, donc je ne pige rien. Merci de m'aider si vous le pouvez. Ersansoucis (talk) 19:31, 3 February 2015 (UTC)
- Salut. Chez moi ça marche pourtant. En tout cas, avec Mediawiki 1.23.7, et la dernière version de WYSIWYG maintenue par Riparap. Varlin (talk) 19:42, 3 February 2015 (UTC)
- If you have problem with MW 1.24+ and protected property OutputPage::$styles, you have to make manual adjustments in one of the files of wysiwyg extension (latest version at current moment is 1.5.6_0 [B551+02.02.2015] and it can be found here in Github)
- For more details about protected property OutputPage::$styles, please see this thread and links Protected_variable_in_MW1.24. Riparap (talk) 18:36, 4 February 2015 (UTC)
Nothing happens after installation
[edit]Hello, i´ve uploaded the folder to my webspace and added the line, but how can i open the editor? When I click on "Edit" always open the default editor. Krabat der Zauberlehrling (talk) 10:48, 12 July 2013 (UTC)
- In your preferences, go to the "Editing" tab and scroll down to "Rich Editor."
- Make sure that the "ShowWikiTextEditor" and "Start with rich editor disabled" options are unchecked. 216.8.158.237 16:38, 15 July 2013 (UTC)
Blank pages after install
[edit]Seems to have been an issue before on this thread but the blank pages after an install is happening to me with the latest version. New to all of this so i could be making a newbie mistake. WikiEditor took me awhile to figure out! Happens on Firefox and Chrome on my Windows 7 PC and on my Mac. Anyone got any suggestions? 92.41.1.240 18:30, 19 July 2013 (UTC)
- Update: Was being lazy before and missed a part (Part missed: Remove (or comment) the two lines that contains wfLoadExtensionMessages( 'CKeditor' ); (probably line 345 and 532) in WYSIWYG/CKeditor.body.php). My pages appear now but WYSIWYG is still not working although specialPages/version says i have it and i can check boxes in editing preferences that suggest i should be seeing it.
I no longer see WikiEditor either although i copied over my old local setting with what Govicien advised. I took out parts such as-- WYSIWYG:
- <syntaxhighlight lang="PHP">
Here is what i have exactly encase there is an issue there-
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
require_once("$IP/extensions/WYSIWYG/WYSIWYG.php");
$wgGroupPermissions['*']['wysiwyg'] = true;
$wgDefaultUserOptions['cke_show'] = 'richeditor';
$wgDefaultUserOptions['riched_use_toggle'] = true;
$wgDefaultUserOptions['riched_start_disabled'] = false;
$wgDefaultUserOptions['riched_toggle_remember_state'] = true;
$wgDefaultUserOptions['riched_use_popup'] = false;
$wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI;
$wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE; 188.29.121.47 23:30, 19 July 2013 (UTC)
Double Javascript Show RichTextEditor and WikiTextEditor
[edit]Hello..
I have little problem when changing from ShowRichText to WikiText. There are duplicate link button appear such link below:
Image
What must I change for this WYSIWYG?
Thank you. By Sephirothindra 06:00, 23 July 2013 (UTC)
- Done. By Sephirothindra 07:02, 21 August 2013 (UTC)
What's the latest on Semantic Mediawiki Forms integration
[edit]I'm finally working hard to update my
- MW 1.16 / SMW 1.5.2 / SF 2.4
- (One of the last Semantic Forms to work with FCKEditor)
to
- MW 1.21.1 / SMW 1.8.0.4 / SF 2.5.2
The WYSIWYG editor installed easily and looks awesome, but unfortunately I can't deploy this yet until it works with the free text area in a Semantic Form.
What's the status of this? Is anyone working on it? Does anyone have it working?
Thanks. Salquint (talk) 18:16, 25 July 2013 (UTC)
- Update: I asked about visual editing in general on the Semantic Forms discussion page, and Yaron isn't interested in supporting WYSIWYG integration. Salquint (talk) 02:58, 26 July 2013 (UTC)
- Is anyone else interested in seeing this integration happen? Salquint (talk) 13:40, 21 August 2013 (UTC)
- Four times a year isn't too often to ask, right? Is anyone else interested in seeing WYSIWYG working with the latest Semantic Forms? Should I just stick with my old install for the next few years until the Visual Editor works decently? Salquint (talk) 15:46, 16 November 2013 (UTC)
- Time for the quarterly request for status on / interest in WYSIWYG support with the latest stable Semantic Forms. Maybe no one but me is interested, which would be good to know. Take care. Salquint (talk) 19:34, 3 March 2014 (UTC)
- Time for the quarterly request for status on / interest in WYSIWYG support with the latest stable Semantic Forms. Maybe no one but me is interested, which would be good to know. Take care.
- Congratulations Riparap on the upgrade work. Salquint (talk) 19:34, 3 March 2014 (UTC)
- Thanks :).
- Just out of curiosity I tried to install MW1.22.4 and latest SMW + SF. I was able to find out a place where "free text area" is formed in SF and I could make it start plain CKeditor instead. However I could not find a way how to start wysiwyg editor from that place.
- I downloaded versions of FCKeditor and version of SemanticForms integreated with it. I will try to spy if same approach could be reapplied with #6 wysiwyg. Problem with the way FCKeditor was integrated is that it will make upgrading SF very difficult. Perhaps out there is somebody who would know a better way to do this?
- I am checking this just out of fun, because I do not have urgent need for SMW + SF myself. This may be a little bit too big issue for me, I do not know enough about this kind of programming...so I do not promise anything, it may be that they will complete VisualEditor before I am ready with this :) Riparap (talk) 16:57, 21 March 2014 (UTC)
- #6 bundle of Download section and branch CKeditor_4 has modified version of SF 2.7 where you can edit text inside free text area of SF with wysiwyg editor. Because my experience about SMW and SF is limited to simple test case of "home library" (example of use on SF page), I am not sure how good modification behaves with different contents of pages.
- Modification works only with SF 2.7 (it can not be upgraded in future without manual modifications, test environment: MW1.22.4, SMW 1.9.1.1, SF 2.7) Installation instructions can be found in README.md of #6 bundle.
- Open issues with this SemanticForms / Wysiwyg integration with free text block of SF:
- preview of page is not displayed properly
- switching editing mode with "source" -button to wikitext works, but switching back to wysiwyg mode fails (text stays in wikitext format), separate "wikitext/wysiwyg" link works ok
- refreshing page in editor mode always activates wysiwyg mode
- Question: how can I found out what code is executed when preview and source -buttons are pressed when edit takes place with "Edit with form" page of SF? Riparap (talk) 08:20, 27 March 2014 (UTC)
MW 1.19.7 Image and Link Problems
[edit]Hello, I'm running MW 1.19.7 with the user patched version of WYSIWYG and have 3 problems. 1: When I try to change the align of an image in Firefox it gives me the options ( empty | empty | empty | center). Chrome gives ( empty | undefined | undefined | center ). 2: While editing, the images are way too large. 3: When I do a link to a PDF file it doesn't work because the 'file:' isn't added. Does anyone know how to fix these? 87.147.135.163 22:46, 2 August 2013 (UTC)
problem when insert image
[edit]Hi everyone!
I have a problem : when i insert an image in wikitext editor with form "
", then I come to Richtext editor-> it's show a image . then I come back to Wikitext editor, and come back to Richtext editor -> it's a link , not a image.
how to fix it?
Thanks!
MediaWiki: 1.19.1
PHP : 5.3.16 (cgi-fcgi)
MySQL : 5.0.51b-community
WYSIWYG : 1.4.1 203.162.126.157 04:04, 5 August 2013 (UTC)
All references to smwplus.net are gone, probably forever.
[edit]Its right there under notes? lol? Schalice (talk) 18:34, 15 August 2013 (UTC)
Category gone when switch from wikitext into wysiwyg
[edit]Hi all.. I have problem when create category for my page using command [[Category:Name]]. First, I create using Wikitext editor, then switch using rich text editor for preview. After that, my category was gone!!what happen that? Hopefully with your help all. Thank you By Sephirothindra 07:01, 21 August 2013 (UTC)
- Works with help from this link. By Sephirothindra 03:52, 23 August 2013 (UTC)
Working WYSIWYG available for MW 1.20.7 (integrated with new wikitext editor)
[edit]Hello,
I have used the work made by DheerajKumarBit to prepare a working version of WYSIWYG and WikiEditor MediaWiki 1.20 extensions. This allows to use CKEditor for editing the wiki articles.
The following has been done:
- Install WYSIWYG 1.7 extension
- Add/Replace the five files shown by with the patches to make it work in MediaWiki 1.20 version
- Modify some of the JavaScript code for integrate WYSIWYG and WikiEditor
The source code is available to view and to download from this Github repository (you can download a zip package from here). I am using it as part of the MediaWiki distribution at work.
Enjoy it! Ciges (talk) 16:44, 29 September 2013 (UTC)
- Thank you Ciges for uploading a version of WYSIWYG that works with MW 1.20.7. This is the best version of WYSIWYG I have tried in any version of MW. However there is still an issue with the insert image functionality. When you perform a search on an image file everything works great as long as the image you're looking for isn't the first one on the list. If the search only returns a single image, or if the image you're looking for is first in the list, then the the preview doesn't work and only a tiny thumbnail image is inserted. It appears that the first item in the list of images returned from the search has an extra space before the filename and this prevents the code from finding the correct file. Does anyone know which bit of code needs to be updated so that the image search function works as intended? 91.125.93.105 18:24, 11 October 2013 (UTC)
- Hi,
- I have just read your message (I have not email notification activated, I see ...). Thanks for your words :-)
- I take note for the image issue to verify in our future deployment and search a solution.
- Regards Ciges (talk) 17:05, 19 December 2013 (UTC)
- Hi Ciges,
- I've added a link to your repository onto the main page, along with Wingsofcourage's repo too, just so that any developers out there that want to contribute alongside of you both know where to go to go.
- If I can spare some time this year, I'd also like to iron out this extension further. Gurce (talk) 07:04, 3 January 2014 (UTC)
- Thanks, Gurce,
- I will work this year on MediaWiki integration for my employeer. My patches need testing and debugging, your help is welcomed! :-) Ciges (talk) 16:32, 3 January 2014 (UTC)
MW 1.19.8 - Editor doenst open, no button is shown
[edit]hey,
first of all my Versions:
MediaWiki 1.19.8
PHP 5.4.19 (apache2handler)
MySQL 5.5.32
WYSIWYG extension (Version 1.7.0_1 [B5], CKEditor 3.6 (revision 6902))
in my localsettings i just added this 2 lines:
- WYSIWYG
require_once("$IP/extensions/WYSIWYG/WYSIWYG.php"); $wgGroupPermissions['*']['wysiwyg']=true;
Its shown correct und Special:Version, in Preferemces-Edit i have - "edit in richeditor" and - "Use toggle to switch between wikitext and rich Editor"
I tried there other Options, i "deinstalles" wikieditor and so - nothing worked
so, what i did:
i downloaded zipfile from:
http://wiki.linuxmatter.com/index.php/File:WYSIWYG.zip
i edited this 5 files: CKeditorParser.body.php CKeditorLinker.php WYSIWYG.php CKeditorSajax.body.php CKeditor.body.php
which is describes in this thread:
https://www.mediawiki.org/wiki/Extension_talk:WYSIWYG#Patch_for_MW_1.19_12780
there some People writes its working for them - for me not
so i edited WYSIWYG/ckeditor/config.js
and deleted and edites some lines which is described here: https://www.mediawiki.org/w/index.php?title=Extension_talk:WYSIWYG&offset=20130613163836&limit=20#Fixed_bugs:_WYSIWYG_doesn.27t_show.2C_Indent_function_doesn.27t_work_22605
y, but when i want to edit an article, just the standart Editor come up and there is no "use rich Editor" button
I tried also to set richeditor to Standard, but it didnt work
here are two screenshots of my preferences and how it Looks like in edit: http://s7.directupload.net/images/131010/3vlro3vi.jpg
i think that was all, would be vers nice if someone could help me out here with any suggestions
Regards,
babacuek Babacuekk (talk) 07:56, 10 October 2013 (UTC)
Has *anyone* gotten this to work on 1.20.3 and IE?
[edit]I've tried about 15 different permutations of this extension but haven't had much luck getting it to run on IE 8 in compatibility mode. (There are so many threads with so many patches that I can't keep them straight.)
The only one that seems to kind of work is (I think) 1.5.6, but it breaks when you're trying to edit image properties.
Anyone??? Kchurch05 (talk) 21:07, 10 October 2013 (UTC)
IE11 with MW 1.22.0 + WYSIWYG extension: numbered and bulleted list empties document with save
[edit]- IE11 problems:
- with MW 1.22.0 + WYSIWYG extension (CKEditor): numbered and bulleted list empties document with save
- If I use IE11 as browser when editing pages in environment described below, page will be empty after saving it.
- With Firefox, page can be saved without problems. I can not find any errors in logs of MW with IE11.
- Has enybody else had this kind of setup and problem? ...any ideas how to get rid of this problem.
- If I remember right numbered and bulleted list worked with IE11 in MW 1.21.2.
- My environment is like this:
- RedHat 6.3
- XAMPP for Linux 1.8.3-2
- PHP to 5.5.6
- MySQL to 5.6.14
- Apache to 2.4.7
- Mediawiki 1.22.0
- MW WYSIWYG 1.20.2 (MW WYSIWYG extension + manual modifications found from this site)
- Sphinx 2.1.3 (+ MW SphinxSearh extension) 194.100.65.210 17:32, 10 December 2013 (UTC)
- In IE11, by pressing F12 DOM window opens. On "Emulation" -screen setting "Document mode" is set to "7 (default). If I change this to any value abowe 7 (8..10 or Edge), edited page with numbered and bulleted list can be saved succesfully. Only problem is that this setting does not stay in effect when page is re-edited and saved. Is it possible to change type of document for wysiwyg editor on server side somehow? Riparap (talk) 19:50, 10 December 2013 (UTC)
- this in include/outputpage
- $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible' ,'content' => 'IE=9' ) ) . "\n";
- set it at the beginning, after charset = utf8
- for me its after
- $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n";
- around line 2260 194.156.246.226 07:37, 13 December 2013 (UTC)
- Is it so that complete file name is this:
- <mediawiki_install_dir>/includes/OutputPage.php
- The row number is not valid for me, but I can find existing line:
- $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n";
- so I added new line after prev. line
- $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible' ,'content' => 'IE=9' ) ) . "\n";
- Is this correct place ?
- In IE11, this seems to change document mode to "9 (Default)", just out of curiosity, what does this mean?
- With this fix, after quick test, editing with numbered / bulleted lists work with IE11, Chrome (Version 31.0.1650.63 m) and Firefox (26.0).
- How sensitive this modification is to version number of browsers? Riparap (talk) 18:57, 16 December 2013 (UTC)
- This setting should work fine, but it would be wiser to make the WYSIWYG extension change it (only when necessary: MediaWiki edit mode, WYSIWYG mode enabled) instead of having the webmaster struggling. Furthermore, be sure that the metatag is placed before every other metatag. Ricordisamoa 18:00, 12 February 2014 (UTC)
- Good idea....
- Wysiwyg editor is embedded in "original" wiki page which is also controlled by mediawiki. I guess this and also requirement to get it "first" was the reason why "194.156.246.226" adviced to put setting in file of mediawiki. Another issue is that in this location modification may be overwritten by future updates of mediawiki.
- Perhaps better place for this kind of fix would be with a hook named "onBeforePageDisplay" used by wysiwyg. I added line "$out->addMeta( 'http:X-UA-Compatible', 'IE=9' );" in the end of code in "onBeforePageDisplay" which will produce line "<meta http-equiv="X-UA-Compatible" content="IE=9" />" on page....but it is located as last in the list of all "<meta.."'s.
- Is there any other way to insert metatag http-equiv="X-UA-Compatible" to get it as first?
- ...or is there a way to sort "<meta" lines somehow at this point?
- Related threads: corrupted_category, adding_metatag_as_first. Riparap (talk) 10:04, 13 February 2014 (UTC)
addMeta()should definitely support an optional argument to customize the tag's placement. Ricordisamoa 02:38, 14 February 2014 (UTC)- That would be good.
- The original problem of this thread was that at start time of this thread, my IE11 used setting "IE=7" for MW 1.22 pages (because at that time wysiwyg treated normal mode of IE11 as "non compatible" with wysiwyg). I noticed that this caused blank page problem with list items of wikitext. Then to my question I got this advice to force IE11 to emulate mode "IE=9".
- At some_point_later I found a way to enable wysiwyg also in normal mode if IE11 => I have now tested this again so that I removed setting of emulation mode "IE=9" from wysiwyg and then set up "Tools=>compatibility mode" ON with IE11 browser => it seems that blank page problem is back. If I then set "Tools=>compatibility mode" OFF, page will be in "Edge" mode with IE11, and page works just fine when there are list items included on page.
- So the right solution to my original question was not to force emulation mode to "IE=9", but to switch OFF the setting "Tools=>Compatibility mode" of IE11 for wiki site (this will let browser to use the "latest" mode). I will leave this setting like this for my site, and report if it will not work properly.
- =>(updated later:) Noticed some problems with focus on page with dialogs of wysiwyg in editing mode, see details below. Riparap (talk) 20:28, 14 February 2014 (UTC)
- But if Compatibility Mode is switched on by default, it should be switched off by the extension.
- Does that solve Existing category definitions will be corrupted... too?
- Support for IE11 was disabled by Wikia, so I think there are some other flaws, aren't there? Ricordisamoa 00:09, 15 February 2014 (UTC)
- I have not found any problems with MW 1.22 and IE11 normal mode, so I guess keeping IE11 in normal "Edge" mode is fine for MW1.22. (I do not know about Wikia, is it related to MediaWiki somehow?). With this normal mode setting (=no specific compatibility mode set in any places), numbered and bulleted lists worked fine in IE11.
- But it seems that there are problems with IE11 normal mode and wysiwyg dialogs (in editing mode): focus on page is lost and moved into beginning of page at exit of dialog.
- So...I have changed setting of my wiki now so that in includes/OutputPage.php there are no settings about compatibility mode (=>pages look better in normal mode of IE11), instead in hook "onBeforePageDisplay" compatibility mode is forced to IE=9 when wysiwyg editing mode is entered (addMeta() setting has effect dispite the position of "..IE=9.." as last meta directive).
- So far this seem to work properly (=#6 source bundle >=17.02.14), also category and both list items (numbered and bulleted) work without problems. Riparap (talk) 11:16, 17 February 2014 (UTC)
- This setting should work fine, but it would be wiser to make the WYSIWYG extension change it (only when necessary: MediaWiki edit mode, WYSIWYG mode enabled) instead of having the webmaster struggling. Furthermore, be sure that the metatag is placed before every other metatag. Ricordisamoa 18:00, 12 February 2014 (UTC)
- Is it so that complete file name is this:
- thanks Riparap you idea about:
- s it so that complete file name is this:
- <mediawiki_install_dir>/includes/OutputPage.php
- The row number is not valid for me, but I can find existing line:
- $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n";
- so I added new line after prev. line
- $ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible' ,'content' => 'IE=9' ) ) . "\n";
- worked for me, thanks a lot 199.64.7.238 (talk) 15:55, 13 March 2019 (UTC)
Color Font
[edit]We use a patched version of this extension on Mediawiki 1.17 and the color font doesn't work. The colors work on the editor but when the page is rendered, all the color is lost.Does anyone have a fix for this? 60.254.151.41 08:54, 16 December 2013 (UTC)
- Have you tried version #6 in Extension:WYSIWYG#Download? Ricordisamoa 18:09, 12 February 2014 (UTC)
- Font colors as well as text background colors work with #6 bundle of WYSIWYG#Download.
- I have tested that bundle only with MW1.21.3 - MW 1.22.2. It would be interesting to know if that bundle works with MW1.17 or not. Perhaps you can test it and give feedback about results.
- If it does not work, perhaps you should consider upgrading your wiki to latest version 1.22.2. Using f.ex xampp package, you can create "isolated" installation of MW and other components needed. I have upgraded our internal wiki from MW1.21.3 => 1.22 updating everything (versions of php, mysql) and it went rather smoothly. Riparap (talk) 15:00, 13 February 2014 (UTC)
Working version for MW 1.22.0
[edit]Working on IE-10/Chrome using:
- MW 1.22.0
- PHP 5.5.3 - 5.5.7
Download link Straumli (talk) 09:03, 16 December 2013 (UTC)
- Does this only work with PHP 5.5 and not 5.4? I can't seem to get this to work with IE9 or IE10. I am using XAMPP (Windows) with PHP 5.4. Br549times3 (talk) 23:23, 16 January 2014 (UTC)
IE11 with MW 1.22.0 + WYSIWYG extension: Existing category definitions will be corrupted after page has been saved
[edit]IE11 problems:
Creating first initial category definition works on page where there are no categories before. After editing page with IE11 where there already is category defined, category definition will be corrupted after page has been saved.
It will be also corrupted if button "code" is pressed (to toggle between wikitext and wysiwyg view). I quess this is same kind of issue as in post by "Hoggle42 (talk)19:20, 20 November 2013" "Editor_removes_assigned_category_16286" (but I do not know if this is caused by the same reason as with IE9 explained by Hoggle42).
This is some kind of parsing error, because when i press button "Code", definition of category will be [[Category: |Testi]] as wikitext (there is extra "|" character added).
This problem did not occur with Chrome (32.0.1700.102 m) or Firefox (v26.0), it appeared in IE11 only.
I was able to go around this problem by commenting out following lines in ckeditor/plugins/mediawiki/plugin.js, but I quess this will make wysiwyg editor incompatible with older versions of IE:
/*16.12.13 ->*To make category work with IE11***
if (CKEDITOR.env.ie)
text = htmlNode.text;
else
*16.12.13 <-*/
text = htmlNode.textContent;
Is there a way to find out what is the exact version of browser (not just IE, or FireFox)?
Any better ideas how we can get rid of extra "|" character with IE11? Riparap (talk) 19:24, 16 December 2013 (UTC)
- Browser sniffing is bad practice. Instead, try replacing the above block with the following:
if (typeof htmlNode.textContent != 'undefined') text = htmlNode.textContent; else text = htmlNode.text;
- textContent should be correctly supported in IE11 and other up-to-date browsers, while IE<11 could still use the fallback property. Ricordisamoa 23:58, 5 February 2014 (UTC)
- This looks much better and works ok in my installation (with IE11, FireFox (v26.0/ v27.0). Thank you very much. Riparap (talk) 17:39, 6 February 2014 (UTC)
- Glad to help ;-)
- Have you tested the change with older versions of IE, and maybe with other browsers as well? If it is working fine for them all, then I could send a patch to Gerrit. Ricordisamoa 13:16, 7 February 2014 (UTC)
- I tried my installation (#6) only with IE8, but it does not work for some reason:
- page with bulleted or numbered list will become empty when mode is changed from wysiwyg to wikieditor. If list is created in wikitext mode and then switched to wysiwyg it works.
- I tried to cancel this modification, but it did not help, result was the same with IE8. I think it must be some other kind of problem but I could not find where the problem is :( . Riparap (talk) 22:24, 7 February 2014 (UTC)
- This extension is very buggy, and every bugfix appears to uncover new problems :(
- I'm seriously thinking of closing the documentation page and directing users to VisualEditor (perhaps buggier than WYSIWYG, but newer). Ricordisamoa 12:51, 8 February 2014 (UTC)
- Problem was caused by this
- IE8 problem, for some reason with IE8 there where extra attribute "data-cke-expando=" left in code when editing mode was switched to wikitext. I had not applied that fix in my installation earlier. Your modified test seems to work with IE 8 without problems as does my #6 installation too. Riparap (talk) 16:40, 9 February 2014 (UTC)
- To be clear, no problems in IE8 nor IE11?
- AFAIK, IE has a feature to see webpages as if they were viewed using a previous version (IE10, IE9). Such tests would be useful (if you can), although I actually don't care much of supporting legacy browsers. Ricordisamoa 19:17, 9 February 2014 (UTC)
- I have tested this fix (and #6 bundle) with IE8, IE11, FireFox (v26.0, v27.0) and Chrome(32.0.1700.102 m): with these browsers wysiwyg of #6 bundle works ok (with the modification you suggested).
- With IE11 I have not noticed before that I have on page "Tools=>Compatibility View settings" selected option "Display intranet sites in compatibility view". With this setting on (#6 bundle of) wysiwyg works ok. If I deselect that setting, wysiwyg eiditor won't start and it reverts to wikieditor. Riparap (talk) 09:25, 11 February 2014 (UTC)
- We could consider developing some fixes/updates to make it working on the real IE11. According to [1], support for IE11 has been disabled deliberately. Can you try to reenable it somehow and report any errors? Thanks in advance. Ricordisamoa 12:00, 11 February 2014 (UTC)
- I had to add following code in function CKEditor_IsCompatibleBrowser() of file ckeditor/ckeditor_php5.php (placed before last return false; -line) to make wysiwyg start in normal mode of IE11. Based on quick test, #6 bundle seems to work with normal mode of IE11 too.
- I am not expert on this field so it may be that rule to test version of IE11 is not perfect, but as it is last test of block it should not harm other tests in any way (+ there is always possibility to switch into compatibility mode if wysiwyg does not work in native mode of IE11 for some reason).
else if ( strpos($sAgent, 'like Gecko') !== false && strpos($sAgent, 'Trident/7.0; rv:') !== false ) { /*IE11 in normal mode: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko */ $fVersion = (float)substr($sAgent, strpos($sAgent, 'rv:') + 3, 4) ; return ($fVersion >= 10.0) ; }
- I do not have possibility to test this with IE9 or IE10 browsers. Riparap (talk) 09:47, 12 February 2014 (UTC)
- Inserting
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">
- as the first metatag in the page (I don't know how to do this in MediaWiki, sorry) should force IE11 to Compatibility Mode.
- Maybe the devs at Wikia/WYSIWYG weren't aware of this workaround. If we succeed inserting the metatag on "wgAction=edit" only, we'll solve many problems at once. Ricordisamoa 16:22, 12 February 2014 (UTC)
- I think I have already done this kind of modification because of this empty_page problem. Definition is currently in file <mediawiki_install_dir>/includes/OutputPage.php like this (NOTE! File is not included in #6 bundle):
$ret .= Html::element( 'meta', array( 'http-equiv' => 'X-UA-Compatible' ,'content' => 'IE=9' ) ) . "\n";
- Modified setting helped to solve the empty page problem with bulleted and numbered lists on save with IE11 browser earlier. I do not remember why setting "IE=9" was selected, because any one of the values 8, 9, 10 or Edge would have done the trick in that case. Riparap (talk) 16:41, 12 February 2014 (UTC)
- So WYSIWYG should already be enforcing the Compatibility Mode: to ensure that, you should reset your browser's Compatibility settings and check that IE is defaulting to Compatibility Mode.
- Moreover, could that setting be edited by the extension itself (e.g. with a hook)? Ricordisamoa 17:25, 12 February 2014 (UTC)
- Good idea ... I just do not have skills to do this (see also thread: numbered_and_bulleted_list_empties_page_with_save. Riparap (talk) 10:15, 13 February 2014 (UTC)
- We could consider developing some fixes/updates to make it working on the real IE11. According to [1], support for IE11 has been disabled deliberately. Can you try to reenable it somehow and report any errors? Thanks in advance. Ricordisamoa 12:00, 11 February 2014 (UTC)
- This looks much better and works ok in my installation (with IE11, FireFox (v26.0/ v27.0). Thank you very much. Riparap (talk) 17:39, 6 February 2014 (UTC)
Maintainer Update
[edit]Just a heads up. Found this on the original maintainer's Wikipedia page:
- SMW+ is an open source software bundle composed of the wiki application MediaWiki along with a number of its extensions, that was developed by the German software company Ontoprise GmbH from 2007 to 2012. In 2012, Ontoprise GmbH filed for bankruptcy and went out of business. DIQA-Projektmanagement GmbH, a start-up founded by former Ontoprise employees, now offers support for the software in SMW+, though under the name "DataWiki". Technomensch (talk) 18:45, 17 December 2013 (UTC)