Fonts added to the TinyMCE are not apply style - tinymce

I want to add new fonts to tinymce . I put my fonts in tiff format in the following path:
tinymce/themes/advanced/fonts/
In the two files editor_template.js and editor_template_src.js, in the theme_advanced_fonts section, I added the fonts name as follows:
theme_advanced_fonts : "B Nazanin=BNazanin,B Titr=BTitrBd;Andale Mono=andale mono,times;Arial=arial...
It is now displayed in the font dropdown editor, but when I select that font for an example: B Titr, the font of that expression will not be change to B Titr.
Can anyone help?

Are you passing CSS to the editor that includes these fonts? The editor itself is an iFrame so you need to pass CSS to the editor that includes these fonts so that when you try to use them the browser knows how to render them.
https://www.tiny.cloud/docs/configure/content-appearance/#content_css

Related

How can i add different custom font to different target in iOS

I am trying to add 3 different custom font to 3 different target how can i add that font. one storyboard have 3 labels which has bold, semi-bold, regular font weight with different size. i have added ttf font file in each target info.plist but how can i set font to each lable ???
1.check the font file is added to the projectworkspace
2.click the attributes inspector and you will find text click dropdown and choose attributed and you've to choose the font you added in your project and Finally again change text to plain

VS Code customize sidebar

Is there any way to customize sidebar in VS Code? In particular, I want to change the font size. Is there a user setting for that? Or, maybe, I can edit it somehow via stylesheet since it's an Electron app, like in Atom?
There are no user-defined stylesheets for vscode.
The only ways to scale various parts of the UI currently are through the overall zoom level (window.zoomLevel) and the editor's font size (editor.fontSize).
I created a feature request for this on the repo.
As mentioned in other answers there are extensions which allow injecting custom CSS, you should be careful using these as they directly manipulate the source code of VS Code which could lead to problems elsewhere and any modifications could break when you update.
I Found a way to change the font of Visual Studio Code Window.
First, open command Pallete, and type "Toggle Developer Tools"
This will open "Chrome Inspector".
Select any text of sidebar of app.
Search .monaco-shell class in "styles" tab at right side inspector ( Where show every styles of the current document ), then the font-family attribute.This is tab and stylesheets.
In workbrench.main.css hit right click and click in "Open Soruce Panel" Show like this
Format the css Code with this icon.
ctrl+f for found font-family attribute again, 'cause the format redirect to end of css document, and get .monaco-shell class like this in ~6371 line.
Change this font ( I have change to Droid sans Mono font ), but you change to you want.
Why i'm not change in the real document css
'Cause, when i changed the font family in the real document css ( C:\Users\${user}\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbrench.main.css) generate a error saying "Vscode have a error, please reinstall the program" or similar
When generate a actualization of application, the font family declareated will deleted, and the document css is´t a pretty code.
This process change every fonts of visual studio code application (not include the editor font )
I found it very effective to use the general zoom settings (it's somewhere in that huge settings window). This adjusts the zoom level of the entire app. Tweak it till you like the size of your explorer window, then adjust the settable editor font to be readable with that zoom level. I three parallel code windows of 80 columns plus the explorer on a good 17" laptop monitor, readable if you are OK with 8pt code font (which is actually 11 point font zoomed two notches down).
Although there is no direct way of customize the sidebar from settings as #Daniel Imms mentioned in his answer, but I found 2 plugins which helped to resolve this issue. You can either one of them if you want.
1. Custom CSS and JS Loader
In Custom CSS and JS Loader plugin, you need to create a custom css and then this plugin will inject that code directly in electron-browser/index.html(as VS Code is an electron based editor). I use this CSS in my Mac:
".explorer-viewlet .mac": "font-size: 1.2em !important",
2. CustomizeUI
CustomizeUI relies on the Monkey Patch Extension to inject custom javascript in VSCode. Here is the settings I use (in settings.json) for my Mac:
"customizeUI.stylesheet": {
".explorer-viewlet .mac": "font-size: 1.2em !important; overflow: auto; border-left:none!important",
},

Change default font in netbeans?

Is it possible to change the default font in netbeans? The documentation says:
The font Monospaced is maped to different fonts on different systems.
On Windows it is mapped to "Courier ", on Linux it is mapped to
"Lucida Typewriter".
http://ui.netbeans.org/docs/ui/editor_fonts_colors/Editor_fonts_and_colors.htm
I'm on windows and want to map Monospaced font to 'Consolas' instead of 'Courier'.
P.S. I know that fonts can easily be changed from options, but when I change it in this way, I can no longer use unicode characters. Guess I need to do what they call 'mapping' the monospaced font to other font.
Tools > Options > Fonts and Colors
Set the category "Default", and to the right of that, the font you want to use.
If this does not fix it, try adding:
--laf Nimbus -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd
or
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal
to the file : netbeans.conf. You can find it in $NETBEANS_HOME/etc/ folder. Make your application font smaller from system preferences.
To change the font size outside of the editor you can configure by editing the Net Beans conf file, you can find it here:
C:\Program Files\NetBeans 8.0.2\etc\netbeans.conf
Then edit this line:
netbeans_default_options="..."
by adding this at the end:
--fontsize 18
I hope it helps :-)
Life becomes more easier now. Just from Tools menu choose Options and then follow steps on the following screen shot and take care with step 3 and 4 which they are making the default font for all languages:
I have a NetBeans plugin called 'UI-Editor' which allows you to customize virtually any Swing property, including font sizes, colors, and types. Go to Tools->Plugins and search for 'UI-Editor' or go here: http://plugins.netbeans.org/plugin/55618/?show=true
also don't not forget to change the font to the one that support Arabic like Arial for example i am not sure of some one mention that i just tried it
As far as I can tell there's no way to do this. jEdit (http://jedit.org) also uses Swing and DOES do font substitution for all fonts - there's a "automatic font substitution" checkbox in Global Options > Text Area, along with a list of preferred fonts. But jEdit is otherwise not as capable as Netbeans.

Adjusting the font size used for paragraph in tiny mce plugin

I used TINY_MCE plugin to have an advanced editor. The problem is that the default font used in this plugin is too small for me. Is it possible to change it? I mean the default font used for paragraph. As you can see below, the font is smaller that the font I used for other fields.
Thanks.
This is not that difficult. The easiest was will be to use the tinymce init paramter content_css
//css file, which will overwrite the default css settings for the editors itframe
content_css: 'my_css_file.css',
in this ccs file you need to set
p {
font-size: 30px; // or whtever you like
}

tinymce paste text with color

I'm using the paste plugin in my tinymce editor.
when i'm pasting a text inside of it (from a word document for example) , the text is copied but without it's color.
how can I paste the text with it's color?
Thank's In Advance.
Ok, i suggest you use the paste plugin then.
The paste plugin has a very usefull setting called paste_retain_style_properties.
Using this parameter you may define what styles you wish to keep.
You can select 'all' to keep all styles settings or use a comma-separated list.