Extension talk:TinyMCE/2021
Add topic| This page used the Structured Discussions 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. |
If you have a bug report please post it On the phabricator site for this extension
Using a subset of html elements
[edit]Deari Duncan,
First of all, thank you for all the wonderful work you've done. I have been using TinyMCE before through more ad-hoc js solutions but this is a great step forward!
This may sound like an odd question, but would it be possible to more easily use/preserve HTML tags and opt out of some of the wiki-specific alternatives in wiki syntax? For a number of reasons, I myself prefer using elements like <i>, <strong>, <h2>,/<h3>/etc, <table>, <p>, etc., which are also part of wiki syntax), as well as <a>, which requires some additional configuration. Currently, sections tagged in this way are visually replaced, which doesn't make for very comfortable editing, which is why I'm asking. Cavila 13:40, 6 January 2021 (UTC)
- Hi Cavila
- I'm very glad you are enjoying using the TinyMCE extension.
- You raise a really good question. You probably noticed that, generally, html embedded in wiki text is preserved when you edit the page with TinyMCE. However, as you say, any html entered using TinyMCE is converted to its wiki text equivalent when the page is saved.
- I think there may be a configuration option that will allow one to identify specific html elements entered using TinyMCE to be preserved. I'll look into that and let you know. There could be some limitations though. It is not possible to mix html and wiki elements within tables and possibly lists also, which may prove more problematic. DuncanCrane (talk) 17:32, 6 January 2021 (UTC)
- Hi again Cavila
- So I was almost right! It is possible to do this by configuration except for a couple of lines of code which need to change and subject to the caveat on lists and tables!
- If you need this quickly, I can update the master branch of the my development site on GitHub with the code changes. This should be possible before the weekend but won't be fully regression tested and therefore probably shouldn't be used for production.
- Alternatively, I'm working on a new minor release with some bug fixes and other minor features. If you can wait, I hope to release this on Gerrit later this month.
- Let me know either way? DuncanCrane (talk) 12:20, 7 January 2021 (UTC)
- Hi Duncan,
- Many thanks for your speedy replies. A configuration option would be most welcome! About the mixing of html and wiki elements, do you mean, for instance, that as soon as html-style ol/li or ul/li lists are used, the editor won't be able to handle nested wiki elements in the same way? I could live with that anyway.
- I'm not in a terrible hurry and certainly wouldn't expect you to be, so please take your time!
- Maybe you're aware of this, but html syntax for tables behaves curiously in at least one respect because everything (tr, td, th, etc.) works except for tbody. I remember circumventing that problem by adding it the list of invalid elements I think. Cavila 00:18, 8 January 2021 (UTC)
- Hi Cavila
- That's great, thanks for your patience. The configuration option is a part of the standard TinyMCE (see TinyMCE formats). All that is (should be) required is to overwrite the format for each of the elements that you wish to preserve and assign the class 'mwt-preservehtml' to them. I will provide documentation for this, however there are a couple of bugs that stop this working currently. One is in the extension itself and the other is in TinyMCE! I think I have a fix for both, but will need to do some regression testing to be sure I haven't broken something else :-)
- The one area I think may be less straightforward is to do with tables. I have adopted the default of always converting to wiki markup on page save because of the problems with mixing the two. The current TinyMCE extension already has a modified version of the TinyMCE Table plugin with a fix for the tbody issue. I hope I will be able to also modify this plugin to recognise if it is dealing with a table that is embedded html and to then preserve the editor html rather than converting it to wiki markup. I'll need to investigate this further.
- The problem only arises, I think, if you mix the wiki and html markups within the same list or table and I'm not even sure if the mediawiki parser handles mixed markup of that sort.
- I'll post here when I have a new release available. DuncanCrane (talk) 14:36, 8 January 2021 (UTC)
Is this possibble to run the editor on mobile device?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
After running "&action=tinymceedit" in the mobile version (minerva skin), tinymce will not load. Can it be fixed? 88.156.253.32 (talk) 22:42, 28 January 2021 (UTC)
- Hi, and thank you for using TinyMCE.
- I haven't tried with Minerva before so I'll have to investigate further. TinyMCE does work with the Pivot skin which is designed for use with mobile devices so I don't see any reason why it shouldn't work for Minerva in principle.
- I'll post something here when I've had a look :-) DuncanCrane (talk) 12:28, 29 January 2021 (UTC)
- Thank you very much for your answer. So I've set the pivot skin as default and it still doesn't work (editor doesn't load). I think I found the reason - it is MobileFrontend extension. After removing MobileFrontend and using the pivot skin, everything works as expected. Unfortunately, to use the both Minerva skin(on mobile) and Vector skin (on desktop) MobileFrontend is required 88.156.253.32 (talk) 15:16, 29 January 2021 (UTC)
- Hi
- I did find the Minerva skin worked with TinyMCE so I suspect you are right abot MobileFrontend. I'll look inot that and let you know what I find. DuncanCrane (talk) 11:06, 30 January 2021 (UTC)
- Hi again
- I've now looked at the MobileFrontend docs and it is clear that their approach is likely to be the cause of the problem as they disable resource loader modules for extensions. I understand their rationale for this but it looks like a significant amount of development time is going to be required to get this working with TinyMCE.
- Some other skins that TinyMCE works with are mobile responsive such as Pivot and Chameleon. Pivot, for one, was written to be 'mobile first' . If you can do without MobileFrontend then one of these might be the way to go? Of course, if yours is an established site then the option of using different skins may not be open to you.
- There may still be an amount of config within TinyMCE to optimise it for mobile use but I think that would be more manageable as it is reasonably well documented.
- . DuncanCrane (talk) 11:39, 30 January 2021 (UTC)
- Thank you for response. I undestrand it now 5.173.137.20 (talk) 17:53, 1 February 2021 (UTC)
Is there a functional demo or example available online?
[edit]Is there a functional demo or example available online? The one linked from the article is non functional. Currently the link under the text "An example of TinyMCE on discoursedb.org" is non functional. Hutchpd (talk) 16:28, 4 February 2021 (UTC)
- Hi Hutchpd,
- Sorry I missed this before. Thank you for using this extension. DiscourseDB is very kindly hosted by @Yaron Koren so hopefully he'll see this mention.
- Many thanks
- Duncan DuncanCrane (talk) 17:42, 11 March 2021 (UTC)
TinyMCE not available when editing sections of a page
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hiya! When editing a whole page the editor automatically opens up. When only editing a section of a page the standard editor opens. Is there an option to change that (meaning also having TinyMCE available for section editing)? TIA!
Gina Nilasae (talk) 14:12, 16 February 2021 (UTC)
- Hi Gina
- Thank you for trying the TinyMCE extension and I'm sorry it's taken me a while to reply. By default the TinyMCE editor should work on sections if it is enabled. Would you be able to tell me what extensions and skins and their versions you have installed on your wiki? It sounds like there may be a conflict which hopefully I can resolve.
- Many thanks
- Duncan DuncanCrane (talk) 08:31, 19 February 2021 (UTC)
- Hi Duncan - it's MW 1.31.12 with Vector Skin as default. My list of extensions is:
- CategoryTree (8242603)
- ParserFunctions 1.6.0
- SearchExtraNS (2f60af1)
- SyntaxHighlight 2.0 (2d5a60a)
- LDAP Authentication Plugin 2.1.0 (770c89e)
- TIA!
- Gina Nilasae (talk) 09:37, 23 February 2021 (UTC)
- Hi Gina
- I can't think why any of these should cause a problem.
- If you are using v1.0 of the TinyMCE extension there have been a few bug fixes which haven't yet been uploaded to the mediawiki Gerrit repository. You might try the latest version (1.0.5) in the master branch of my GitHUb development environment here. If that still doesn't work, would you check for any php errors happening? Let me know if you need some suggestions how to do this?
- Duncan DuncanCrane (talk) 14:16, 23 February 2021 (UTC)
- Hi Duncan,
- that seems to have done the trick! I now have "edit | | edit source" next to the section titles. We do have another issue but I'll post it on the phabricator site. Thank you for your excellent work!
- Cheers,
- Gina Nilasae (talk) 13:28, 25 February 2021 (UTC)
Set Edit Source as default but still have TinyMCE as an option
[edit]I would like to set Edit Source as default but still have TinyMCE as an option to switch to. How can I do that? 65.29.203.223 (talk) 14:57, 26 February 2021 (UTC)
- Hi
- Thankyou for using the TinyMCE extension. That's an interesting idea. Currently it is assumed that if you are using the TinyMCE editor then that would be your first preference. I think this is also the case with Visual Editor too. It should be possible but would require some coding changes. DuncanCrane (talk) 11:34, 2 March 2021 (UTC)
- Yeah, I generally use TinyMCE to make tables only. Otherwise I use edit source. I've found TinyMCE trashes source code with unnecessary formatting so I try not to use it only for tables. 65.29.203.223 (talk) 18:38, 4 March 2021 (UTC)
- Thanks for the update. TinyMCE tries to maintain the formatting of source wiki code as closely as possible. Mediawiki has some pretty quirky constraints on how it processes source code, particularly new lines, and a large amount of code in the extension is devoted to trying to preserve that. Unfortunately there are are literally thousands of possible combinations so I can only fix those I'm aware of. Now if you'd like to give me some examples of where TinyMCE trashes the source formatting I can try to see if I can resolve these?
- Thanks in advance DuncanCrane (talk) 17:21, 11 March 2021 (UTC)
- Thank you for replying. I actually tested more and it doesn't seem to be trashing the source formatting like I remembered. Maybe it was another extension? Regardless, when I challenged your extension it behaved as expected, so good job! 65.29.203.223 (talk) 13:13, 19 April 2021 (UTC)
- Hi
- Thanks for testing further and I'm glad that the issues you had in the past seemed to be resolved. This version of the TinyMCE extension was based on another developed by someone else. It's been an objective of this version to retain the wikitext formatting as best we can, although there are some use cases we haven't been able to replicate exactly on saving (at least not yet). However we try to keep things clean even in these cases.
- We're now working on a new version which will use the Parsoid wiki to html to wiki converrtor used by mediawiki and this hopefully will completely remove differences on save. DuncanCrane (talk) 15:49, 20 April 2021 (UTC)
- Thanks for explaining further. I just had an issue where the formatting got messed up. I was editing some text with a test and it changed it to
test
65.29.203.223 (talk) 21:14, 23 April 2021 (UTC) - Sorry, that didn't come through right. it changed it to
- <br class="mw_emptyline">test<br class="mw_emptyline"> 65.29.203.223 (talk) 21:15, 23 April 2021 (UTC)
- Thanks for finding this. Would it be possible to give a bit more detail of how this occurred? Eg, was it some existing wiki text that got changed between opening and saving it in the TinyMCE editor, or did you key something directly into the editor and found it saved it with the 'br' tags above? If the former, then if you would paste the original text snippet here, so I can reproduce the error, then that would be a great help, thanks. Likewise, if the latter, would you let me know the what was keyed into the editor that resulted in this output. DuncanCrane (talk) 08:02, 26 April 2021 (UTC)
- Sure, I entered this in from edit source.
- <nowiki>
- test
- </nowiki>
- Then I edited using TinyMCE and it converted it to <br class="mw_emptyline">test<br class="mw_emptyline"> 65.29.203.223 (talk) 13:16, 26 April 2021 (UTC)
- Thanks, that's helpful. I tried to reproduce it with a number of edits and did manage to get it to remove an empty line in the wikitext but not reproduce the error you have! I did wonder which version you are using as there have been a number of fixes from the 'live' version on Gerrit that I'm about to release so maybe this is one of those.
- Would you let me know what version of the extension and mediawiki you are using?
- If you like, you might also try the latest development master branch which is the current release candidate undergoing final testing here
- Many thanks
- Duncan DuncanCrane (talk) 16:30, 26 April 2021 (UTC)
- Thanks for checking the newer versions. I know I'm out of date, but glad it is likely fixed in the future. Currently running mediawiki-1.34.2 and TinyMCE 1.34. 65.29.203.223 (talk) 13:54, 27 April 2021 (UTC)
Deprecated hook (SkinTemplateTabAction)
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi Duncan, I pulled updates for MW 1.35 and got
Use of SkinTemplateTabAction hook (used in TinyMCEHooks::modifyTalkPageLink) was deprecated in MediaWiki 1.35.
(Depreciated in favour of Hooks/SkinTemplateNavigation::Universal)
Just so you know in advance. Cavila 20:35, 5 March 2021 (UTC)
Citing references twice
[edit]I have two issues: (1) I want to use the TinyMCE toolbar to add a reference, but the button indicated in the extension's wiki does not show up (icon with ab[1]). (2) When I add a reference manually using the MediaWiki tags, the reference is added twice - both at the bottom with the reference list (as I want it), but also in the middle of the text as a span. If I turn off TinyMCE, and remove the added code, it works correctly.
MediaWiki: 1.35.1
TinyMCE: 1.35 (I think) 213.113.87.178 (talk) 12:35, 7 April 2021 (UTC)
- Hi
- Thank you for trying out this extension and reporting this problem. There have been a number of fixes that are waiting release to the mediawiki Gerrit repository. You might like to try the latest development release which can be found in the extension master branch here. The release should be labelled 1.0.12. This is undergoing final stages of regression testing and should be robust. DuncanCrane (talk) 17:47, 8 April 2021 (UTC)
- Thank you for the fast reply! I tried the development release you suggested and it seems to have solved the problem. Much appreciated! 213.113.87.178 (talk) 08:16, 9 April 2021 (UTC)
- Great, hopefully that will be officially released soon. Let me know if you have any further problems. DuncanCrane (talk) 07:44, 10 April 2021 (UTC)
- Hi, there are still two problems with references (maybe a regression in your recent code ?). I use the latest version from your Github repository 1.0.12 (c8db455) 19:42, 8 April 2021
- 1) It does not accept XML tags like this: <ref name="hello" /> If present, it will mangle the code on the whole page and references errors will appear.
- Example: https://w.arbores.tech/wiki/TinyMCE-bug
- 2) The URLs in the reference section stop being clickable
- Simple example for this: https://w.arbores.tech/wiki/Journey_map#References
- Wiki version = 1.35.1 https://w.arbores.tech/wiki/Special:Version
- - greetings ! Daniel
- PS: Otherwise, thanx for this extension. The only way to go if you got a wiki on shared hosting :) Daniel K. Schneider (talk) 13:08, 21 April 2021 (UTC)
customize toolbar icons
[edit]This extension is FANTASTIC. Are we able to limit or customize the order of the toolbar icons? If so, can you point me to a reference? Gstratt (talk) 03:10, 16 April 2021 (UTC)
- Hi Gstratt
- I'm really pleased you are enjoying our extension. It is possible to limit or customise the order of the toolbar buttons ( and even have different toolbars for different textareas if you are also using forms).
- To do this you can use the $wgTinyMCESettings configuration variable in your LocallSettings.php file. Something like the following will replace the entire toolbar with a new one. You can remove or reorder the entries however, you like. You can also use '+' or '-' to add or remove a single item from the list, as described on the extension page under Configuration.
$wgTinyMCESettings = array( "#wpTextbox1" => array ( "toolbar" => ''undo redo | cut copy paste insert selectall | fontselect fontsizeselect bold italic underline strikethrough subscript superscript forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist advlist outdent indent | wikilink wikiunlink table image media | formatselect removeformat| visualchars visualblocks| searchreplace | wikimagic wikisourcecode wikitext wikiupload | wikitoggle nonbreaking singlelinebreak reference comment template' ) );
- Hope that works and do let me know if you need any more help or have any comments regarding the extension. DuncanCrane (talk) 07:54, 18 April 2021 (UTC)
- Thanks DuncanCrane! That is exactly what I was looking for. I'm also referencing TinyMCE toolbar configuration for my needs. One thing I'm really missing here is the ability to visually select wiki Categories. Any chance you've written a wikiCatSelect or similar? If that is too massive a code change, is there another TinyMCE compatible solution you could recommend? Gstratt (talk) 13:31, 24 April 2021 (UTC)
- I've found that MediaWiki extension MsCatSelect may be compatible, still testing Gstratt (talk) 15:59, 24 April 2021 (UTC)
- Hi, I'm glad that worked. The config options in $wgTinyMCESettings are basically TinyMCE config options, so the TinyMCE documentation is a good place to look. Of course, some config options are specific to working with Mediawiki and changing them might break the extension, so you will possibly need to experiment a bit - or pose a question here:-)
- It should be relatively straightforward to develop at category selector but would take a little bit of effort. You could base it on one of the current custom mediawiki plugins for TinyMCE which comes with the extension, if you feel up to doing some development? I'm a bit busy on other priorities to develop this myself just now but happy to provide some support if you want to give it a go? DuncanCrane (talk) 07:53, 26 April 2021 (UTC)
incompatible with mw-collapsible
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I tried to use TinyMCE for the first time. As soon as I invoke it in LocalSettings.php, the PageForms I used cannot be collapsible anymore. Everything is collapsed, I have to click on "collapse" twice to show the content again. I am using the latest versions of Chameleon Skin, PageForms and MW 1.35.2. But it also happens in vector skin and on regular pages where I use mw-collapsible and mw-collapsible-content styles. Krabina (talk) 16:28, 9 June 2021 (UTC)
- Hi Bernhard,
- Thank you for using the TinyMCE extension and letting me know about this problem. Would it be possible to give me a little bit more information about where and how you are using the collapsible element and TinyMCE? Even better, if you can let me have an example form definition or page wiki text so I can easily reproduce the problem that would be very helpful.
- Many thanks
- Duncan DuncanCrane (talk) 15:52, 11 June 2021 (UTC)
- Hi Bernhard
- I tried to recreate this problem but haven't been able to. I created a page with the following wikitext:
{| class="mw-collapsible" role="presentation" |- |Lorem |ipsum |- |dolor |sit |}- This displays a collapsible table when the page is viewed, as you'd expect.
- I then edited the page with TinyMCE and, when saved, the page displayed the edited collapsible table - which worked as expected.
- I'm sorry if I have misunderstood what you were trying to do. If I have, perhaps you would provide an example wikitext which reproduces the problem for me to try. Also, would you let me know the version of TinyMCE you are using?
- Many thanks
- Duncan DuncanCrane (talk) 10:14, 14 June 2021 (UTC)
- Hi Duncan,
- indeed, your example works. But this one does not:
<div class="mw-collapsible">Lorem <div class="mw-collapsible-content">Ipsum</div></div></nowiki>
- When you click on the collapse-button the first time, nothing happens. When you click again, the collapse is working fine.
- I am using version 1.1 (20a7624) on MW 1.35.2 Krabina (talk) 09:37, 15 June 2021 (UTC)
- Thanks Bernhard, I got it now.
- There is a bug - or at least I had copied some MW CSS code into the TinyMCE custom CSS file a while back which included CSS to automatically collapse any collapsible content, which is what is causing the issue. I think the original problem I was trying to fix has gone away so I should have removed this CSS. The file affected is MW_tinymce.css in the root of the extension and I have just updated this in the Gerrit repo if you'd like to try again.
- Thank you for trying this extension and please do let me know if you've any questions or suggestions.
- Kind regards, Duncan DuncanCrane (talk) 13:49, 17 June 2021 (UTC)
After Upgrading of TinyMCE it is not working with PageForms
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
After Upgrading from TinyMCE 0.3 to 1.1 it is not longer working with PageForms
MW: 1.31.7
PageForms: 5.2.1
TinyMCE: 1.1 (7c1a5d9)08:37, 2 August 2021
TinyMCE is no longer loading in editor=tinymce forms.
there is a second problem. If TinyMCE loads on "edit" pages. there are errors about "Failed to initialize plugin: anchor". this error is repeated for: autosave, charmap, insertdatetime, preview, save, searchreplace, visualblocks Tsch42 (talk) 15:44, 2 August 2021 (UTC)
- I'm seeing similar problems in the following setup:
- Mediawiki 1.35.3
- PageForms 4.9.5
- TinyMCE 1.1
- On any forms where the free text specifies editor=tinymce, the text area opens as a plain text input box with no toolbars, and the text showing raw wikitext markup.
- This problem is not present in an older setup with the following versions:
- MediaWiki 1.33.0
- Page Forms 4.9
- TinyMCE 0.3
- Since I have no idea if the problem lies with TinyMCE or PageForms, I'll post something on the other extension talk page as well. Lost Student (talk) 23:13, 19 August 2021 (UTC)
- Hi Tsch42 and Lost Student - apologies for the delay in responding. I'll look into these and respond soon.
- Many thanks, Duncan DuncanCrane (talk) 13:30, 20 August 2021 (UTC)
- No problem! I appreciate you looking into it. Please let me know if there's any additional info that would be helpful.
- FYI I looked at the browser console when loading the page and no errors popped up. Lost Student (talk) 19:33, 23 August 2021 (UTC)
- Hi,
- Sorry it took a while again. I've uploaded some changes to the master copy which should fix this.
- Many thanks
- Duncan DuncanCrane (talk) 14:32, 10 September 2021 (UTC)
- No worries, thank you! I will install sometime this week and let you know if it worked. Lost Student (talk) 08:44, 14 September 2021 (UTC)
TinyMCE Plugins
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello,
i set up a Mediawiki with TinyMCE Editor.
I am thinking about adding more open-source plugins from TinyMCE to use it inside my mediawiki.
I tried to copy a new TinyMCE Installation containing all available open-source plugins to my mediawiki extension directory, but that alone didn'nt work. Sadly my knowledge ends here...
Does anyone has included more TinyMCE Plugins yet? Someone has instructions for me?
Best regards,
Manuel MountainGoat92 (talk) 10:04, 17 August 2021 (UTC)
- Hi Manuel
- I'm not sure if all open source plugins will work with the Mediawiki TinyMCE editor. Some of the more common ones have been adapted to work with Mediawiki such as for links and uploads and these are included in the extension. The issue tends to be where mediawiki markup contains it's own syntax for an action, for example links, uploads, tables etc.
- If you want to try other plugins then they need to be placed in the directory extensions/TinyMCE/tinymce/plugins directory of you mediawiki and then follow the instructions on configuration to add the plugin to TinyMCE (taking care to get the location of the plugin correct) and any configuration required to go with it.
- Let me know if there are specific plugins you wish to use and I maybe able to give you some ideas if it will work with mediawiki.
- Many thanks
- Duncan DuncanCrane (talk) 14:45, 10 September 2021 (UTC)
Cite being placed in paragraph
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi, I am trying to upgrade my current set of Wikis to version 1.35. But I am having a few issues with TinyMCE.
I have downloaded TinyMCE from the ExtensionDistributor for 1.35, but when I try and do a cite the citation appears directly below where the citation is called. I get the code:
# <span class="mw-cite-backlink">↑</span> <span class="reference-text">A footnote</span>
I'm using:
| Product | Version |
|---|---|
| MediaWiki | 1.35.3 |
| PHP | 7.3.21 (apache2handler) |
| MySQL | 5.7.21 |
| ICU | 64.2 |
| TinyMCE | 0.3 (5b02bf9) 09:19, 4 September 2021 | GPL-2.0+ | The TinyMCE WYSIWYG editor | Ephox, Hallo Welt, Duncan Crane and Yaron Koren |
I have done what was suggested in this topic by taking a copy of the master, but with the master I just get white space where the editor should be.
I have been experimenting with VisualEditor as well, but I have a load of other issues with that when it comes SSL certification.
Any help is appreciated.
Gary Squeak24 (talk) 16:52, 2 November 2021 (UTC)
- I have managed to get the master working now. But, I am now getting Failed to initialize plugin:anchor amongst others.
- I'm now using:
- ! colspan="5" |Editors
- |-
- !Extension
- !Version
- !Licence
- !Description
- !Authors
- |-
- |TinyMCE
- |1.1.2 (5b02bf9) 09:19, 4 September 2021
- |GPL-2.0+
- |The TinyMCE WYSIWYG editor
- |Ephox, Hallo Welt, Duncan Crane and Yaron Koren
- |} Squeak24 (talk) 13:51, 3 November 2021 (UTC)
- Phew, finally got it working! I think.
- In the MW_tinymce.js file the external plugins were being called incorrectly. I am using a Windows Server 2012 running WAMPserver.
- Basically, the way the plugins were being called looked something like:
'anchor': mw_extensionAssetsPath + '/TinyMCE/tinymce/plugins/anchor/plugin.js',- To make it work I had to change the / into \
- This now looks like
'anchor': mw_extensionAssetsPath + '\TinyMCE\tinymce\plugins\anchor\plugin.js',- Not sure if this is due to Windows or not. Squeak24 (talk) 14:48, 3 November 2021 (UTC)
- Hi Gary,
- My apologies I haven't spotted this until now and I'm glad you managed to resolve it (or please let me know if not). The extension distributor seems to have a reputation for not always having the most recent code which seems to affect many extensions. I should probably make this more explicit in the documentation for TinyMCE. I think you are correct about the differences for file paths in Windows. I run off Unix like servers so hadn't tested for windows servers. Your fix should work and I can note this in the documentation. When I have a little time, I can see if there's a way to fix this in the code too.
- Thanks for your input, Duncan. DuncanCrane (talk) 09:52, 10 November 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.TinyMCE not working with page forms
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi again.
I have an issue now where when I try and edit with form using the tag:
editor=tinymceThe TinyMCE editor doesn't show in the form.
This is the same issue as Topic on Extension talk:TinyMCE
Any idea what the issue is?
Gary Squeak24 (talk) 15:49, 3 November 2021 (UTC)
- I have opened this as a bug: ⚓ T295293 TinyMCE not working on Page Forms MediaWiki 1.35 (wikimedia.org) Squeak24 (talk) 15:24, 9 November 2021 (UTC)
- Hi Gary,
- Thanks, I'll look into this DuncanCrane (talk) 09:54, 10 November 2021 (UTC)
- Thanks Duncan, any help is appreciated.
- Gary Squeak24 (talk) 17:13, 10 November 2021 (UTC)
- Hi Gary
- I found that the version of TinyMCE wasn't automatically enabled for PageForms. I have now loaded a patch to fix this to the master branch in Gerrit
- Many thanks
- Duncan DuncanCrane (talk) 10:39, 15 November 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.Depricated Hook After Upgrading to MediaWiki 1.37.1
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello, I'm not sure which version I was using before, but I just upgraded to 1.37.1 and upgraded the TinyMCE extension. When I try to edit a page with TinyMCE I get
Deprecated</b>: Use of EditPageBeforeEditToolbar hook (used in TinyMCEHooks::removeDefaultToolbar) was deprecated in MediaWiki 1.36. [Called from MediaWiki\HookContainer\HookContainer::run in /directory/public/includes/HookContainer/HookContainer.php at line 137] in <b>/directory/public/includes/debug/MWDebug.php</b> on line <b>375
Any suggestions? 74.136.16.180 (talk) 18:40, 23 December 2021 (UTC)- Hi, would you let me know the version of the TinyMCE extension you are using? The maintenance policy for the TinyMCE extension is 'master' so the master branch on Gerrit is the one to use. If you check the version number for TinyMCE on the 'version' special page on your wiki, what does it say?
- Many thanks
- Duncan DuncanCrane (talk) 15:43, 31 December 2021 (UTC)
- Hi, I went ahead and did
- git clone "h...://gerrit.wikimedia.org/r/mediawiki/extensions/TinyMCE" (modified this because it was saying linkspam warning on mediawiki.org submission box)
- and my version shows as 1.1.2 (f9abe09) 08:38, 30 December 2021.
- I am still getting the same error. Thank you for your help. 74.136.16.180 (talk) 17:18, 3 January 2022 (UTC)
- Hello, I've got the same problem. After moving to a stronger server – with probably some different software running – TinyMCE stopped working. The Toolbar doesn't show up at all and if you activate PHP-Errors I do get the same error.
- Update: Also occurs using mediawiki 1.37.0
- Update: Apparently the issue is already solved when php errors are deactivated. Clear browser cache afterwards and that worked for me. Activede (talk) 20:33, 6 January 2022 (UTC)
- Thank you both for the responses. The deprecation message is, I believe, a warning message. Although the code is deprecated, it hasn't been removed from the Mediawiki core (https://www.mediawiki.org/wiki/Manual:Hooks/EditPageBeforeEditToolbar). The reason it still exists in the TinyMCE extension is to maintain backward compatibility with Mediawiki version 1.35, which is the current long term stable version, and still widely in use. It appears that the problem is being caused by the Mediawiki system reporting the warning when PHP errors are activated, rather than the the existence of the deprecated code itself in the TinyMCE extension.
- It seems that, when Mediawiki outputs an error message, the page output is no longer in standards mode (https://www.tiny.cloud/blog/tinymce-requires-standards-mode/). This is potentially a bug in Mediawiki as, without error reporting, Mediawiki does output pages in standards mode, as Activede points out. This might be considered as a bug in Mediawiki not trapping and handling php warning error messages in a way that allows execution to proceed, although there are ways to debug mediawiki that might allow this (https://www.mediawiki.org/wiki/Manual:How_to_debug) by using a log file for error messages. Alternatively you could use the following in local settings, which means only fatal php error will be output to the browser page (note the +ve '1' not -ve as in the Mediawiki documentation:
error_reporting( 1 )
- I hope this works for you but, if not, please let me know. DuncanCrane (talk) 16:36, 7 January 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.