TinyMCE 4: Plugin-Window - word wrap available? - tinymce

I try to migrate our custom plugins from TinyMCE 3 to 4.
In some cases there is some text in the plugin's window to describe how to use it.
Fiddle example: http://fiddle.tinymce.com/Hndaab/1
So if the text is very long, the window width increases until some parts are out of the viewport.
How can i tell the WindowManager to use automatic word wrapping for my labels?
I already tried to define a width for the window. And in another plugin i found a param "multiline". Both didn't solve my problem.
Any ideas? Thank you

I've been trying to accomplish something similar for mobile commpability where the windows are to large for the viewport and so far the closest i've gotten is to set the css for .mce-window to
.mce-window {... max-width:100%;max-height:100%;}
maybe that will be enought to fix your specific problem, even if I still have some ways to go for it to fluidly only fill out the available viewport space on all other windows.

Related

How to make UILabel display multiple lines in the Today Extension?

I have been trying to not ask basic questions on stack overflow, but I cannot find a clue on the Internet related to this problem.
I wish to make my UILabel display multilines in my widget (Today Extension).
The "set lines to 0" solution works in the main app, but this doesn't seem to work within the widget. It keeps displaying only one line with '...' at the end.
Does anybody know how to resolve this issue? I will attach some screenshots to explain my problem further.
Increase the line limit number to 3 or more.
You can test the multiline wrapping by typing in the label yourself.
I know that setting it to '0' is suppose to work however when it comes to alerts and displays it does not always apply. I know that by giving it a number like '3' or '4' it is not dynamic, however, it will solve your problem with the notifications.
Alternatively you can use the "Autoshrink" feature, you can change it to minimum font size. By doing so, the application will shrink down the text to the font size you provided.
Some developers will also suggest checking the box, 'tighten letter spacing'
hope this helps.

Increase the width of the Search box on Elements tab in Google Developer Tools?

Anyone know how to increase the width of the Search box on Elements tab in Google Developer Tools? Right now it's only ~200px wide.. that makes it hard to see any CSS selector or Xpath locator that's more than ~25 characters long.
Screenshot Example
You can't change this without a custom theme. Which shouldn't be needed just for this. I've opened a bug for the team to know I'm going to patch this to make the input take as much width is available.

TinyMCE image resize handles are misaligned inside scaled containers

EDIT 2: An even better solution, for me, was to just use offsetWidth and offsetHeight as that will return the width without the transformation applied. But getBoundingClientRect() was used for a reason, as there is a comment next to that part mentioning a bug with Gecko and resizing tables with captions. The application I am working on is quite cutting edge, and is only required to work on Google Chrome as it is an internal application, so this fix is better for me, but still not ideal.
EDIT 1: I have found a way to fix this, but it required changing the TinyMCE source code, since the application I'm working on keeps track of the scaling applied to the contenteditable area, I was able to just insert my scaling multiplier as a divisor and apply it to the targetWidth and targetHeight variables in the function showResizeRect() on lines 14,197 and 14,198 of the unminified tinymce.js file (as of v4.2.6).
This is not an ideal fix, so I preferably like to do this a better way, so if anybody knows of a better way that does not including changing the TinyMCE source, then please enlighten me.
You can see the bug report I filed here.
I'm having an issue with TinyMCE, I am working on a web application, and we are using an inline TinyMCE instance to edit content that is inside a scaled contenteditable container. However, when going to resize an image, the resize handles are smaller than the image. Here is a demonstrative image:
I have searched on Google, but did not find anything relevant. Is there a plugin, or perhaps a workaround that deals with this already?
Thanks in advance.

Widget widths: 50% + 50% > 100%?

I am using Google Apps Script and the Apps Script UI Builder, which is based on GWT widgets.
If I create a Flow Panel, and add two Labels of 50% width, then these labels appear on separate lines. But isn't 50% + 50% = 100%.
How do I make them appear on the same line?
To try it out yourself:
Open a Google Spreadsheet.
In the Spreadsheet menu, click: Tools / Script Editor...
In the Script Editor menu, click: File / Build a user interface...
Add the widgets to the canvas.
Of course this question doesn't just apply to the problem with the labels. In general I am totally puzzled concerning how to build flowing layouts with the UI Builder. There seem to be (hidden?) paddings and margins that make things very hard.
It's all based on CSS and its box model, and that issue has accumulates cruft over the last 15 years or so. In essence, the widths you specify don't take into account margings (and/or possibly padding, it's been a while), so you will need to add a stylesheed that minimizes them. See something like this CSS reset.
Labels translate to <div>s, which appear on different lines by default. You could try adding float: left to the labels, or change the display mode, etc.
You could also try InlineLabels, which I think compile to <span>s.
If you've already tried all this, then your Labels are apparently just too wide. It's annoying that two 50% objects wouldn't fit on the same line, but what isn't annoying about working with HTML and CSS?
The solution is simple. For both labels, set to zero:
Borders and Margins / Margin
Don't know why I didn't see that yesterday - I was doing a night shift... ;-)

Combobox show text properly

I have a combo box that when I open it should show text like
However I get something like
with the scrollbar set to middle. Thing is sometimes for the same values it shows properly
and sometimes it shows from middle(for same value).
I want it to show properly like in the first image and I've tried a couple of things but with no succes.
itemSection.setHoverAlign(Alignment.LEFT);
itemSection.setTextAlign(Alignment.LEFT);
itemSection.setAlign(Alignment.LEFT);
... and other irelevand stuff ...
Any help is highly appreciated. Thanks alot!
If I am not getting wrong, You want to set your scrollbar at particular position. FOr that you need to ovverride the css of that and try to set scrollbar position to 0. So that your problem will get solved.
The problem with any kind of selections box is, that the boxes display and behave completely different across browsers. The older the browser the worse it handles long texts in selection boxes (some just truncate the text). I suggest to keep the displayed text as short as possible. That way you can avoid this problem.
If you really need long description, you can try to add a tooltip to every entry. Or use a different widget to make the select from, e.g. some custom widget in a separate dialog...