TinyMCE 6: how to reconfigure toolbar after init() has already run? - tinymce

With TinyMCE 5.x and older, I used to be able to run editor.setMode("readonly"), adjust editor.settings.toolbar and then call editor.setMode("design") to be able to reconfigure toolbar contents after the editor.init() had already been run. I already figured out that editor.setMode() has been replaced with editor.mode.set().
However, the whole editor.settings API seems to have vanished and TinyMCE 6.x documentation only shows toolbar examples with init(). I cannot notice any info about this API being removed in migration guide at https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ either. The editor.settings has documentation for TinyMce 5.x at https://www.tiny.cloud/docs/api/tinymce/tinymce.editor/
Is it possible to reconfigure TinyMCE 6.x options toolbar or plugins after editor.init() has already been executed?

Related

How to add favicon for mkdocs websites?

I am developing mkdocs website. Here I need to add favicon for my website. I tried like this but it is not working.
I added site_favicon in mkdocs.yaml file and using readthedocs theme. But it is not working
site_favicon: img/favicon.ico
Can anyone help me with this?
Simply save your new image to img/favicon.ico within your docs_dir. There is no need to change any setting.
Back in version 0.16.0, the site_favicon configuration setting was deprecated. Then in version 0.17.0 is was completely removed. Therefore, your config is doing nothing.
All of that said, you may be running into the bug reported at #1671, which was fixed in #1672 and will be available in the next release. If so, you will need to wait until 1.1 is released.

Eclipse start with previously set (un)folded methods

I frequently use folding/unfolding of methods in Eclipse for Java while working. However after each launch of Eclipse I need to redo the settings of folding/unfolding methods. Is it possible to make the framework "remember" my settings in each opened file? By folding/unfolding I meen clicking (+)/(-) button as on the following picture:
Please note I do not want all methods to be folded or all to be unfolded. I want the fremwork to remember my settings.
Although Eclipse doesn't natively support the remembering of folding/collapsed state of its editors, you can use external plugin to do the same. Here's a plugin that might help you with your problem.
Eclipse Folding Plugin

TinyMCE table properties failing to update in IE11

Using tinymce 3.7 We have a text editor where if one right clicks on a table to bring up table properties and changes the background color the changes are not reflected on the actual table after hitting update.
I tried searching to see if this was a known issue perhaps addressed in a later version of TinyMCE but could not find anything that appeared to discuss this particular issue. Is there a fix or at least documentation of this being a known tinyMCE issue that any of you know of?
There are a lot of issues in TinyMCE with IE11. To solve those issues you'll have to upgrade to at least 3.5.10 version of TinyMCE. Everything works fine in 3.5.10. I tested it on IE11. There's just one thing which will not work, that is searchreplace. For that you'll have to upgrade to 4.x version of TinyMCE.

Plone 4.3 default editor isn't showing up

I have a Plone 4.3 site that was a migration from a Plone 2.5 site. It had been working fine, but for some reason the default editor that shows up when editing any page or content item is the straight HTML view.
I've tested it in Firefox, Chrome, and Safari — all shows up the same. The drop down menu above the editing box shows these options:
I've also tried switching the "Default editor" both in the Site setup > Editing Control Panel and also through the ZMI > portal_properties > site_properties > available_editors but no dice. The options there are None, Kupu, and TinyMCE.
There are two other Plone sites on this same instance (not migrations though, they started as Plone 4.3 sites) and their editors show up like normal.
Any thoughts? I'm at a loss, except to maybe try uninstalling and reinstalling TinyMCE through buildout, but I'm wary of whether or not that might break something else, especially if it breaks the other two sites.
4.3 suffers from some random failures loading generic setup profile steps on creating a plone site. There are a few alternative ways to resolve this:
1) Identify the missed steps (in this case TinyMCE) and go to portal_setup and run them. Or, rerun all the steps.
2) Remove or comment out the line "PYTHONHASHSEED random" in base.cfg. Rerun buildout. Restart. Re-add your Plone site.
3) Upgrade to Plone 4.3.1. I haven't heard of anyone having this problem with 4.3.1. If you do, be sure to file a bug report!
Plone also stores the chosen editor in the user preferences.
Check http://yoursite/##personal-preferences
There's a small script which migrates all users to tinymce -> http://plone.org/products/tinymce/documentation/how-to/how-to-set-tinymce-as-default-editor-for-current-users/

tinyMCE editor bar not showing up

I'm running Plone 4.1.4 and when I try to edit a text area that used to display the tinyMCE editor all I get is a dialog box listing a dict of "valid elements". I installed the kupu editor and that works fine, but I prefer tinyMCE. Has anyone run in to this issue? Any help would be greatly appreciated.
Browser and version? IE 9 has TinyMCE issues, and requires you to use a development release.
To get around it I had to install a version from github. If you have mr.developer, use:
Products.TinyMCE = git https://github.com/plone/Products.TinyMCE.git branch=GSOC-3.4.x
I have come across this problem as well. In my case I updated Plone 4.1.2 to Plone 4.1.4. The rich widget will not show the TinyMCE editor when the content type has just been added. But after saving the content type and then editing, TinyMCE would appear as expected.
The weird thing is that if you add a new Plone instance and then activate and add your custom AT content type. TinyMCE would render fine on your text fields.
A work around that seemed to solve the issue is to go to portal_setup and on the upgrade tab, select Products.TinyMCE:TinyMCE to upgrade. It would show that the profiles (version 3) on the ZODB and the filesystem are in sync. You can downgrade by clicking on "show old upgrades" and running upgrade profile 1.1->2. This worked for me but please try this on a development instance.
This looks exactly like a problem I had a few days ago. Are you using IE7 or below?
Though I don't know if this is the right way to go (more experienced devs, please advise), this is what I did:
(Assuming a windows box... )
Stopped the plone services
located the file on the filesystem called tiny_mce_init.js (in my case c:\Plone41\eggs\products.tinymce-1.2.10-py2.6.egg\Products\TinyMCE\skins\tinymce\tiny_mce_init.js)
go to line 93 (in my case this contains:
media_strict: false,
remove the comma resulting in media_strict: false
save the file
restart the services
Looks at Thariama's answer here.
I had the same problem (with IE and FF). It looked like the archtype installation was the problem.
After changing the order unter "ZMI->portal_skins->Sunburst Theme" (putting tinymce above archetypes), TinyMCE worked.
(http://plone.293351.n2.nabble.com/Tinymce-not-working-after-custom-type-is-installed-td7566873.html)