How to open resizable TinyMCE popup - tinymce-4

I try to open a popup in tinyMCE, which can be resized by the user (with resize handler and all this fancy stuff).
I've tried multiple settings, but nothing worked.
Has anyone an idea how to accomplish this?
This is my simple code to open a Popup:
w = tinyMCE.activeEditor.windowManager.open({
title: "My html dialog",
url: '/',
width: 200,
height: 200
});
Thanks

TinyMCE's native windows have no ability to provide resize handles. You could build your own HTML page and open it by clicking a toolbar button (or menu option). As you would (in this case) be in full control of the page you are opening you could make it function however you like.

Related

How Link button perform new tab when clicked even it has also jquery code to perform

Is it possible that a link button can open a tab window with a certain URL even it has also jquery code to perform like showing a popup box?
Let say when I click the link button, it popup messagebox came from jquery code and also open a new tab. is that possible?
jQuery deals with client side
LinkButton is a server side control
Check following STO thread:
Link Button
Also, opening a new tab can be handled by browsers, so some browser may open
a new tab while others may open a new window

window.open in web application for iPad running in fullscreen replaces the existing window

I am writing a simple (ASP.NET) web application for the iPad. It is written and works well however one feature is it serving up PDF files (among others). To do this I used window.open to open the file.
When this is done in Safari, it works perfectly. You click the button, the file opens in a new tab; you can then close the tab to return to the previous web page.
However now running the application in fullscreen mode - i.e. with the appropriate "meta names" set and from a shortcut on the home screen - when you click the button to load the file, it loads fullscreen with no means to get back to the last page.
Because it is a file, not a webpage, I can't put a "Back" button on, and when you press the iPad button it simply closes the whole thing.
I know this has been asked before and I have read a number of similar questions - the closest of which was this:
https://stackoverflow.com/questions/9168236/web-app-hyperlinks
If at all possible, it would be far preferable (thanks to the control library I am using) that the button click is done with javascript - it is not easy to set the link href.
The upshot is I really I just want to create a new window from within a fullscreen iPad web application, or allow the "back" navigation somehow...
Is this possible?
Thanks!
Create an iframe on your page rather than using an window.open and set that as the target.
That way your pdf would open within your existing window.
Use some client side javascript like jQuery to style it like a dialog window.

navigateToURL ... set modal property

When a user clicks a button, I need a separate browser window to popup. How can I set the modal property of the application? (ie, when a popup window opens, the main application is disabled until that popup is closed ... I need to use a browser window rather than a popup window, but can't figure out how to disable the main application)
PopUpManager.createPopUp (this, navigateToURL( url, "http://www.google.com" ) , true );
thanks!
[[Updated Answer]]
Ok, my modal dialog looks like so:
cg = mx.managers.PopUpManager.createPopUp(this, ChoiceGrid, true) as ChoiceGrid;
PopUpManager.centerPopUp(cg);
But, what I would do instead of what you're asking, is embed an IFrame in the modal popup. This is exactly what we're doing in our app to collect CC data (well, not the popup part, just the IFrame bit. http://code.google.com/p/flex-iframe/
This way, you have the standard modal dialog you're looking for, AND an internally managed 'view' out to your checkout server. Something like this:
<code:IFrame id="iFrameWithJSfunctions"
src="{checkoutURL}" />
The flex-iframe is pretty easy to work with, for the most part. You shouldn't have many problems with it.
[[Original Answer]]
I'm not sure you need a PopUp to do this.
Why don't you simply do:
navigateToURL(urlRequest,"_blank");
instead?
You should think of a Flex App as a self contained entity. The PopUpManager is designed to create Windows (Panels / any UIComponent) that reside over another component inside the SWF. It does not create items that pop up out of the SWF or in new browser windows.
navigateToURL could be used to create a HTML pop-up from your Flex application. However, there is very little--if any--communication between the SWF and the browser pop up. And there is no way to make a modal pop-up.
You might investigate performing an ExternalInterface call and creating your new pop up in JavaScript. Here is an article about creating modal windows in JavaScript. Before going too far down that road, I would think carefully about your requirements. How would feel if one browser window popped open another browser window and prevented you from doing any browsing until you addressed the issues in that window. Or to put it another way, how would you feel if Microsoft Word opened a word document and wouldn't let you edit any other document until you shut down the first one? I'd be pretty upset.
Modal application dialogs are one thing. And the PopUpManager allows you to create those. I would consider Model application windows a bad UI decision.

jQuery UI Dialog cause page jump on open & close on ASP.NET

I have an ASP.NET C# page, with image thumbnails in it.
I created a script that opens a jQuery UI Dialog on each hover on a thumbnail that shows me the thumbnail in larger size in a dialog view, and when I hover out - dialog closes.
My little annoying problem is, that in every mouseover (trigger dialog to open) - the page makes itself 'longer' - a scrollbar appears on the side of the browser, and it seems like the page gets longer when a dialog is openning, but it shouldn't do so.
When I hover off (mouseout) - the dialog disappears and the page returns to its normal state.
Because of this- when I hover through the thumbnails, my page 'jumps'.
I looked for a solution for this, and I've added return false; for each dialog open, and close - and it still doesn't make any different.
Sorry for the unperfect english, and thanks for all helpers!
I finally got my solution - for all interested:
open: function(event, ui){
/*
* Scrollbar fix
*/
$('body').css('overflow','hidden');
}
I added this to dialog's opening event and it fixed the issue!

JQuery UI Dialog widget problem with IE and ASP.NET

The JQuery UI Dialog model form widget has an issue with ASP.NET when a button on the dialog is clicked to submit the page. It doesn't work because the form elements in the dialog window are outside the html form tags. So I used the fix of doing $("#dialog").parent().appendTo($("form:first"));.
It works in Firefox but not in IE because the modal window now appears to be part of the rest of the webpage which is disabled. Visually, this is evident by the stripes showing on both the modal window and the rest of the web page.
You should be putting the div that contains the dialog inside the form tags to begin with.
You could always submit the form manually by modifying the button to:
$('#myButton').click(function(){
$('form:first').submit();
});
I had this same issue. You need to append it to the form on open. This worked across all modern browser versions I could find.
$('#foobar').dialog({
autoOpen: false,
modal: true,
open: function () { $('#foobar').parent().appendTo('form:first') },
title: 'FOOBAR'
});

Resources