JQueryUI Dialog TinyMCE Issues - tinymce

i am having some problems with the TinyMCE (V3.4.7) and JqueryUI (V1.8.14) Dialog
the following Fiddler link shows my example purfectly here
What i am trying to do is open a JqueryUI Dialog box with a TinyMCE WYSIWYG Editor in it.
the first time it displays properly. but if you click close and then reopen the box it will not show the Editor but just the TextArea.
Any help would be good. Thanks
Update
I did find out a solution that works for me, i have put up the working code here
What i am doing is check to see if the dialog has been opened before and if so just open it, then in the Open Function i test to see if the box contains an element with id_parent
if it does then this will be the editor (so do nothing) otherwise just init as usual.
it seems there is a problem with the JQuery Plug in as it does not remove the elements when you call tinyMCE.execCommand('mceRemoveControl',false,'editor_id') and when you re-add the editor it attaches to the first box available.

Problem here is that you need to shut down tinymce correctly in order to open an editor with the same id.
Use:
ed.execCommand('mceRemoveControl', false, 'editor_id');// editor_id equals the id of your textarea

Related

Clickable link in active editor

If I add a link to the active editor either by using the menu/context menu or by simply typing a URL (e.g., http://www.google.com), the link is added but it is not immediately clickable. The only way a user can use the link to navigate to a page is by ctrl-clicking and choosing to open in a new tab. If the editor is in read-only mode then it works as intended but not when the editor is active.
Is there a way to make links clickable in an active editor?
thnx,
Christoph
TinyMCE will not (by default) make the link clickable. You can right click on the link and a context menu appears. In that menu is an option to open the link. To modify a link one needs to click on it (select it) in TinyMCE. If that act (clicking) opened the link you would not be able to easily select the link to act upon it in the editor.

Customize TinyMCE Code Editor

I use TinyMCE (with react-tinymce moudle on npm). I need to customize the HTML code editor, so that it looks like the one on Wordpress. I think it should be possible as Wordpress use TinyMCE.
What makes the editor on Wordpress comfortable is we don't need to enter <br> or <p> on code editor. But when we switch to visual mode, it will add <br> or <p> automatically. That makes the text looks much cleaner and easier to read.
Another question is how to make the code editor not displayed in a popup. The main problem with the popup is it will be closed when we accidentally press esc or the cancel button. In addition, the Wordpress code editor also has a toolbar, while the default TinyMCE code editor is just a textarea on a popup.
The code plugin that comes with TinyMCE places the HTML code is a separate window - there in no configuration option that will allow the code to appear directly in the editor's main window.
If you'd like to submit this as a feature request, TinyMCE has a place for that:
https://community.tinymce.com/communityIdeasHome

Opening compare editor results inside a wizard page

In my custom plugin I am trying open compare result inside a wizard page but they always open in an editor or as a new dialog.
I am overriding setVisible(booolean)method, so as soon as wizard page is visible I am opening compare editor using CompareUI.openCompareEditor()call, but this opens up a new editor in the background.
Is it possible to open compare editor results inside a wizard page.
Thanks!!
There is no existing support for this.
You could read the source of the dialog that is displayed by openCompareDialog.openCompareDialog - this is org.eclipse.compare.internal.CompareDialog.
It looks like it might be possible to do the same thing in a wizard page without using internal classes by adapting what that dialog does.

CKEDITOR: Form element - Selection field not opening

I am trying to work with the 'forms' plugin with the CKeditor and was unable to get the select dropdown to open. I can create a selection field but when the field shows up on the editor I am unable to open it (by clicking the arrows) to select a different option on the dropdown.
Out of curiosity I tried it on the CKeditor demo page and it was not working there either, is there a defect logged for this? Or does someone know how to get it to work?

TinyMce plugin, how to copy 'Link' functionality

I'm creating a new plugin for TinyMce. However I cannot find any examples to see some of the functionality I've seen in other plugins. I've read their source code but I cannot find where it is done:
When you click on an 'A' element, the link/unlink buttons in the taskbar become enabled.
When you right click on an 'A' element, then click on the "Insert/edit link" icon that is shown in the popup menu, the "Insert/edit link" window is setup (has all the attributes for that particular link) prefilled.
Could you suggest somewhere where I could learn how to do this? A file and line number is fine.
Thanks in advance.
Here a part of what you want. To highlight a UI button (link) you may do
tinymce.get(editorid).contentManager.setActive('link', true);
EDIT: For the other functionality have a look at editor_plugin_src.js/editor_plugin.js in the directory tiny_mce\plugins\advlink\. It is only small in size. You will find that a file called link.htm is being called to form the popup. Hope this helps.