I wish to have the default table width display in the editor at a width that is visible as currently the default is close to zero width. The screenshot below shows the default width and below that is when you specify a set width via the properties option. Is there a way to have the table default to a certain desired width? Thx
At the moment not. There are various wishes for customizing the tinymce, but before we provide specific solutions we must find a generic method for custom configuration, as we want to be sure that we don't have to support tinymce as well. So this won't be available for some time, unless someone works out a solution and contributes it.
Why is it not possible to configure tinymce at the "normal" way with tinymce.init...?
Related
Background: we have TinyMCE React inside a few contexts where the parent element is manually resized by the user (resizable modal dialog, etc.) and we want the TinyMCE component to resize appropriately. In older versions, we did this using the resizeTo functionality documented here. However, that no longer seems to be available after the upgrade.
My previous attempt to resolve this involved using a key based on concatenating the width and height of the editor with a debounce while it was resizing. Basically, whenever the size changed by enough, I tore down the old component and rendered a new one whose config options included the new size. While this is largely effective, it causes an issue where, when you attempt to edit the field after resizing, it flickers and loses focus initially.
Unfortunately, we are using pixel-based size calculations, so specifying the height in percentages instead of pixels won't work.
What is the new official way to do this? Ideally, there would be some new version of editor.theme.resizeTo that we could use instead and dispatch with the key-based solution entirely, but I was unable to find it in any of the documentation.
Just wrap the editor in a div which has the calculated height and width, and then set the editor to height and width of 100%.
First of all thanks for all the previous advice.
I have come across a rather tricky little problem.
I have a string which I want to display into a Label, normally no problem, but the string is longer than the label will allow. However the similar problem with the text box was resolved with the use of the swt awt hybrid. What I would like to do is replicate this with the label.
Is there way around this? or would the workaround be to have the text area to settext to desired text and then to set the text enable to false so it is grey text.
Could anybody advise?
Your workaround to use Text is perfectly fine. You can mimic label behavior by setting appropriate background color and font and disable it. Also such "labels" are able to provide copy functionality, which is not possible for usual Labels.
Another workaround would be to calculate bounds of your String by using FontMetrics and then cut the string in the end with "..." and providing a tooltip with a full Sting length.
It is also possible to use SWT.WRAP constant for labels, thou it will be still restricted by the width of the Label.
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.
I have a problem, and I haven't been able to solve it or find an answer for a few days now.
My theme (BusinessLite) for some reason has set table width in css to 100px!important.
This forces the TinyMCE made Tables to shrink as much as possible, thus making them useless.
TinyMCE by default converts the set width to inline style tag, but it is ignored since !important is present on the theme CSS. I have tried doing it manually, and i can confirm it fixes the issue, but i don't know of a way to make it automatic?
Does anyone know of a way to set TinyMCE to always add !important to the table width?
You could use the content_css setting to load custom css and overwrite theme css.
You would need to issue the !important too to make it work.
I have a Gtk.TextView inside a Gtk.Fixed and I set it its width and height and wrap mode.
My problem is that I need to avoid the TextView expanding when the user inserts more text than what fits in the set size. In that case I just need to prevent the user from keeping writing.
Any help?
If you have a single line entry as input better use textentry instead of textview.
For text entry your can set the maximum length of textentry.
For development of UI using glade.
Moreover if your UI changes depending on configuration file from server,
there is a solution for this also, have all the widgets in the window, show/hide the widgets depending on the config file from server.
why dont you use GLADE for UI development ?.
It provides more handy ways to achieve your task.
In glade you have all the options to set, you can cross verify and check in real time.