TinyMCE 4

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/7/2013 12:17:35 PM
Gravatar
Total Posts 18439

TinyMCE 4

Hi All,

Just wanted to post for anyone who might be interested that we finally got TinyMCE 4 support completed and will be replacing TinyMCE 3.x in the next release of mojoPortal. It will be possible by configuration to change back to TinyMCE 3.x if needed, but we will only be shipping TinyMCE 4 with our release.

TinyMCE 4 was a major re-write that required a lot of little changes in our code vs the older implementation for TinyMCE 3.x but it does seem like they have made some improvements. Most notably, TinyMCE 4 supports inline editing and we have no implemented inline editing in mojoPortal Html Content feature similar to our existing implementation for CKeditor inline editing.

Currently however, there seem to be some bugs using TinyMCE inline vs using it in our dedicated edit page. Currently when I try to add an image using TinyMCE inline, our file browser works and inserts the url for the image into the Image plugin dialog, but when I click ok, the image is not inserted when the dialog is closed. Actually in IE 11 the image is inserted but at the beginning of the content not at the cursor where it was inserted. I did some hacking around in the image plugin for TinyMCE but could not find any problems there, it never seems to lose its reference to the image. It seems more like the editor loses track of the cursor or selection point for the image and therefore fails to insert it or inserts it in the wrong place as in IE 11.

I've reported the bug to the TinyMCE team, but we will probably disable the inline editing by default for TinyMCE in our next release unless they come up with a fix before then.

If any of you javascript ninjas want to investigate it you can try it now on our demo site or using the latest code from the repository, maybe someone could fix it and submit a patch to TinyMCE.

Please try it out on the demo site and provide any more feedback.

TinyMCE is just about feature equivalent to CKeditor (except for the bug(s)), but I still like CKeditor a little better. One thing is CKeditor has settings for css classes to use for alignment, indenting etc instead of hard coding style on the element, I can't seem to find a similar option for TinyMCE so it still hard codes style when you use those toolbar items.

Thanks,

Joe

11/11/2013 12:54:22 PM
Gravatar
Total Posts 18439

Re: TinyMCE 4

A little update on this. It seems that the TinyMCE team will not investigate a bug unless you can produce it in their very limited fiddle environment, which I cannot do, and it does not let you use any additional html files to implement a custom file browser for example which is what I would need to do to create the bug for them. 

So I guess the bug will go unfixed for a while and we will make the inline editing with TinyMCE disabled by default. Those who want to experiment with it can put this in user.config to enable it.

<add key="DisableTinyMceInlineEditing" value="false"/>

One thing I have noticed about the bug (on our demo site) is that it is clearly happening because the editor loses the cursor location and this happens as soon as you click in the text box to edit the image description after selecting a new image to insert. If you don't edit the description it actually works and then you can click the image toolbar item again after the image has been inserted and proceed to edit the description. It also works if you select an existing image and then replace it. The problem only happens when inserting a new image using inline mode and when you edit the image description before clicking ok in the image dialog. In Chrome and Firefox the image is not inserted at all and in IE it is inserted at the beginning of the content, so in both cases it is losing the original cursor location. You can actually see when the cursor in the editor disappears.

11/12/2013 12:00:32 PM
Gravatar
Total Posts 18439

Re: TinyMCE 4

Another problem with TinyMCE 4 is that there does not seem to be a way to make  a popup window re-sizable or scrollable. This causes a problem for example with our image cropper when you have a large image it is truncated and you cannot get to the part of the image that is not visible in the popup thus making it impossible to crop the part of the image you want. With CKeditor you can resize the window.

You must sign in to post in the forums. This thread is closed to new posts.