TinyMCE codesample plugin dialog height - tinymce

Does anyone know how to change the height of this popup? They use javascript to set the height which is far too much on a small laptop. It's somehow possible to overwrite the styles with important declarations in the css but that feels messy. I wish there was a property that could be used in the init method of TinyMCE.

UPDATE: There are now configuration options for controlling the width and height of the dialog:
https://www.tinymce.com/docs/plugins/codesample/#codesample_dialog_width
https://www.tinymce.com/docs/plugins/codesample/#codesample_dialog_height
ORIGINAL ANSWER: There is currently no configuration option to control this ... you can certainly change this in the plugin's code. In the 4.3.12 version of TinyMCE I changed the code on lines 1103 and 1104 to this:
open: function(editor) {
editor.windowManager.open({
title: "Insert/Edit code sample",
minWidth: Math.min(DOM.getViewPort().w, 600),
minHeight: Math.min(DOM.getViewPort().h, 450),
This reduced the width and height of the editor. Of course if you update TinyMCE you would need to re-add this change but its a pretty simple update.

Related

Disabling italic in tinymce

Using the tinymce wsywig editor, is there any way to disable the fact that using text will be italic automatically ?
Thanks in advance and regards,
Ofer
to clarify what's happened, are you setting some content in the editor to appear when it loads? If so, you can control how content is styled when the editor loads with the setup function. Add something like this to the TinyMCE.init script:
setup: function (noItalic) {
NoItalic.on('init', function () {
this.setContent('<p>This text is not italic</p>');
});
}
It might be that you have a custom style set up that puts italic tags on everything automatically.
Check your tinymce.init script for a content_style value and see if the font-style is set to italic;. If so, remove the font-style option or set to normal.
If neither of these fit your situation, please post some more details – how you've configured TinyMCE with a code sample so we can see the text content in italics.

Is there a way to increase the width of the command palette in vscode

When searching for a type, ctrl-t, the width is not sufficient to read the full path for a given type. Thats why I thought it could help to increase the palette size. But I did not find a tool that allows that. Anybody, please?
I was looking for the same thing, there's a request to add it but there's a work-around if you have the Customize UI extension installed. See the issue here, specifically this part. Below is what I went with
"customizeUI.stylesheet": {
".quick-input-widget": "width: 75% !important; left: 25%;"
},

Siebel Open UI Resizing Image Applet

The new Siebel Open UI, has improve visualization. I have taken a cue from the Card Applet to meet a requirement of an image applet.
I have a created a simple applet with just one field which is the image source path from the contact BC , the html type for the field is an image control and the field retrieval type is Field Data, everything works fine except that I cant resize the image to a fixed size like the card applet for example i want the image to be resized to 200px by 200px.
See Image attached within.
have tried looking for the css attribute for the image control but I could not find it, will appreciate suggestion on this solution
I'm working on a similar requirement. I used custom css in the Siebel theme, something like this:
.siebui-icon-contactfilename>img {
width: 90px;
height: 90px;
}
Doing this I could resize the image to 90x90 px:
Regards.
# Alexander has given the perfect clue , find the css properties and edit it in this case use
.mceGridField.siebui-value.mceField > span > a > img {
width: 200px;
height: 200px;
}
I believe you must have tried this.You can set height/width css atribute to resize image,
You can directly set this in html attribute of control in applet. For example,
http://www.askmesiebel.com/2014/02/siebel-fields-validation-through-html-attributes/
If this is not your answer, please explain your question.

How do I implement <pre> with tinymce

Glad to see a lot of posts about tinymce but there's nothing here that helps me with my current problem.
What I am trying to do is work out how to add "code" to my text with tinymce.
Something like this
Does anyone know how I can do this.
Help would be appreciated.
Mandy
You will need to add pre to the tinymce init setting valid_elements
You need to add to the editor the Code Sample plugin to your editor.
This is the example code to include the plugin from the TinyMCE website.
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "codesample",
toolbar: "codesample"
});
The codesample plugin uses http://prismjs.com/ to embed the code samples within the editor and works out of the box. That is, when a user copies valid code syntax into the editable area the code will be automatically formatted according to Prism default CSS rules.
You need to add prism.js and prism.css to your page for syntax highlighting to work.
Then you will get the code sample button in your editor interface.
Here you can find the Documentation about.

How to change background color of GtkTextView?

How to change background color of GtkTextView? I tried with normal widget set bg functionality but gtk is just changing border color of GtkText View.
Plus can some some please explain me with simple example, that how to change Text Color/Font/Text Size in GtkTextView (Whole text in GtkTextView)?
I fond some examples but they are not working..
Thnaks,
PP.
gtk_widget_override_background_color()
This the GTK 3.x+ way (until GTK 3.16). From
https://developer.gnome.org/gtk3/unstable/GtkWidget.html#gtk-widget-modify-base
"gtk_widget_modify_base has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead"
UPDATE: thegtknerd notes that this method too is now deprecated and it has been since 3.16.
gtk_widget_modify_base()
http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#gtk-widget-modify-base
As of gtk3, I believe the proper way to do that is through CSS. Register a gtk style sheet though GtkCssProvider, then you can write this CSS:
textview text {
background-color: #theme_bg_color;
}
We can see the relevant CSS nodes in the documentation for GtkTextView. In this case I put #theme_bg_color which is an adwaita CSS variable, but you can as well put anything that goes in a usual CSS file, like red or #ff0000.