2sxc 10+, is it possible to add menu/commands to the TinyMCE WYSIWYG Editor? - tinymce

I have a client hoping that we can get 1 or more custom menu commands added in to the default or advanced TinyMCE toolbar used in 2sxc. Is that possible? If yes, how/where do I get started?

There is no quick & simple way to do it, as there is no "injection" point for this. There is so much you could do with tinymce it's a difficult to provide a clear place to inject changes.
So as of now the best way would be to replicate the existing input-component and register your modified one as another input-field. For 2sxc 9 there are some blogs explaining how to do this, in 10.x the API isn't official yet - we want to be really sure it will be long term.

Related

Can I use TYPO3's RTE in a front end plugin?

I have a custom extension, and i need to use some form of text editor in the front-end. According to the documentation, it should be possible, but the documentation and tutorials seem to be deprecated. I think this is not available in typo3 7.6 :
require_once(t3lib_extMgm::extPath('rtehtmlarea').'pi2/class.tx_rtehtmlarea_pi2.php');
Can it be done somehow or do i need to install another extension for this, maybe just a viewhelper? Thank you in advance.
I did lots of researches trying to use the rtehtmlarea in the FE, but failed. Then, I realized I could use any RTE, as they are nothing but js+css. All I need is to render the contents with RTE.FE, like how the BE does, and save the result into the database, which is all I want. I have already done this in many sites, using standalone tinymce, and it works great. So, I think maybe you could try this solution.
To be honest, that feature worked only in theory and never in reality. Use an RTE like ckeditor or whatever fits best

Missing captioned images feature in TinyMCE and Plone5

I'm missing the function to enable captioned images in TinyMCE/Plone5. It was possible to enable that in the control panel with Plone4 (https://plone.org/documentation/manual/plone-4-user-manual/using-tinymce-as-visual-editor/images).
Now I'm using the new Plone5rc3 with TinyMCE 1.4.3, but the properties of TinyMCE in the control panel don't have the needed checkbox.
Does anybody know how to get that?
Thanks a lot!
So here's an answer in parts: you need several things for the captions to work:
Your <img> tags need to have the class captioned. I still need to find a good way to do that. The image picker will remove all other classes everytime you open it, so I guess a good way would be to change the classes that are added by the inline/left/right selection, but I've not easily found where those are defined.
You need the output filter, but fortunately, that is still there. However, the filter wants to see an IImageCaptioningEnabler, which is essentially a flag to turn the captioning mechanism on, and the old editors used to have that and currently, nothing in standard Plone does provide such a beast. If you're comfortable with add-on development, the class you want is
from plone.outputfilters.filters.resolveuid_and_caption import IImageCaptioningEnabler
from zope.interface import implements
class CaptioningAlwaysEnabled(object):
implements(IImageCaptioningEnabler)
available = True
with corresponding configure.zcml stanza
<utility factory=".resolveuid_and_caption.CaptioningAlwaysEnabled"
name="plone5-captions-always-enabled"
zcml:condition="have plone-5" />
(you can tell I patched buildout-cache/plone.outputfilters-2.1-py2.7.egg/plone/outputfilters/filters/configure.zcml and resolveuid_and_caption.py to include that, but of course, you shouldn't do that.)
If you're not comfortable with add-on development, you could, bizarrely enough, see if another editor provides that global switch, you don't need to have it set as your editor or the default editor. (Products.kupu would, but it doesn't install in 5.0. collective.ckeditor might, I can't try that right now due to missing dependencies.)
So, summary: no, you can't easily turn it on; you can turn it on with a bit of hacking; and if you file it as a feature request, it's the kind of thing that takes about fifteen minutes to fix for somebody who knows their way around the code.

Setting up ReactiveUI.Mobile

In the following documentation, https://github.com/reactiveui/ReactiveUI/blob/docs/docs/basics/routing.md
It states that by setting up ReactiveUI.Mobile, you will be able to achieve correct handling of the back button for free. I've tried to look around for documentation but can't seem to find any.
Could someone point me to a suitable link / sample that I can refer to?
It states that by setting up ReactiveUI.Mobile, you will be able to achieve correct handling of the back button for free. I've tried to look around for documentation but can't seem to find any.
Setting up RxUI.Mobile is super platform-dependent, and you only get a free back button on WP8 Silverlight apps. I'd stick with just using routing (or avoiding routing altogether) for now. RxUI.Mobile will probably change quite a bit in 6.0 (it's my least favorite part of the framework at the moment).

UI Automation Verify v/s UISpy - The way they find UI elements

I am trying to automate UI interactions for a C++ MFC application. I tried to find elements' automation ID using UISpy and UIAVerify tools. I am on win2k3.
There is a tab control, the automation ID of which is visible to UISpy but not to UIAVerify.
The issue is - it is not visible even to the C# code that I write using Project White framework or ui automation framework of .net 3.0.
I want to get handle to this control the way UISpy gets it. Is there any way I can find out how UISpy does it?
Thanks!!!
UISpy is likely using Microsoft UI Automation under the covers. You can see how this works from this example*. There are all kinds of conditions on AutomationElement which you can use to locate them.
I've only worked with WPF tabs, but found it really, really hard to locate them by Automation Id. Instead I've been using the AutomationName property, with the title on the tab as the value. Not sure if White supports this, but I'm pretty sure you can get the original AutomationElement out and use it as per the example.
You'll also probably be looking for something supporting the SelectionItemPattern (there's a SelectionItemIsSupportedProperty), and you'll need to use the pattern to select the tab and make it active before you can see anything in it.
Please comment if you need any more info. It might help to know what the structure of your container with tabs in is.
*Declaration of interest since I wrote this.

How to integrate TinyMce with Zend Framework with Gzipping and Image managers?

I have done some research on this subject, and found out, that Gzipping and adding a new image manager through a plugin would not be as difficult. The only question is the Image manager.
I have seen some quite good ones, like the Image Manager for JCE, which is a Joomla wysiwyg editor, but none for TinyMce for itself.
Could someone show me a good image plugin?
P.S. SwampyFoot is out of question, as it's download links are broken, and PhP Letters Ajax image manager is quite hard to install.
Thanks!
EDIT: I just found Mad File Manager, which seems to work excelently except for a little glitch: An image can be uploaded, but cant be selected... Thats sad...
EDIT2: I've found KCFinder, which seems to be very promising, but I just can't get it to work properly. Somehow, the configuration is quite difficult.
Ok, So I have been able to answer my question myself. So here it goes:
Set up TinyMce with Sozfo solution. The important ting to remember here is, instead of extending your Forms from Zend_Form, you have to extend them from Sozfo_Form. As to the defining your own extendable controller, it didnt work for me, So I put the path defining helpers in my Bootstrap. And if the whole ordeal works, there is a textarea that should have TinyMCE controls, but there aren't any, try checking the comments at Sozfo, or checking if the page is cached or not. It took me a good hour, to find out, that the only reason why no JavaScript was pushed to the header was because of a very persistent cache.
Set up KCFinder. The main problems I faced here were due to wrong paths to corresponding files. When the paths were correct, the only thing to remember is to enable it. There is a boolean to change in configuration file.
The last issue was adding the KCFinder to my Tinymce, and what I ended up doing was, I added the function needed to call KCFinder in TinyMCE.php View helper. ( Due to some glitch I seem to be unable to post the code here). Once you have set up your paths correctly, everything should work splendidly.
All in all, it took me about 3 days to figure this whole thing out. Talk about steep learning curve...
Have you looked at MCImageManager - its not free but its an option if you're happy to pay for it
Not really a suggest as you've got it but swampy foot download does work
As you're already using zend framework, why not use dojo, set up the dojo form and call the editor element and integrate this http://docs.dojocampus.org/dijit/_editor/plugins/LinkDialog into it?