ImaginarySense / Imaginary-Teleprompter

Easy to use, free software, teleprompter app.
http://imaginary.tech/teleprompter
GNU General Public License v3.0
258 stars 51 forks source link

Fons size #3

Closed cowanmax closed 8 years ago

cowanmax commented 8 years ago

Hi all! I need to increase font size more that 72. How I can do it? Thx.

Cuperino commented 8 years ago

We're still due to polish the text editor in our prompter. For the time being, you can use the Format option to select a heading preset that has a bigger font size. We'll let you know once this issue is resolved.

cowanmax commented 8 years ago

It's the same size :( Maybe you can recommend me some changes to do it?

Cuperino commented 8 years ago

Hello Cowanmax,

Teleprompter uses CKEditor by default for its rich text editor interface and has partial support for TinyMCE too. You could add the following line into ckeditor/config.js to enter a group of font-sizes the user could choose from: config.fontSize_sizes = '36/36px;48/48px;50/50px;55/55px;60/60px;65/65px;72/72px;80/80px;85/85px;90/90px;95/95px;100/100px';

Place it at any empty line of the CKEDITOR.editorConfig anonymous function, somewhere like line 32. Customize the sizes' list to your needs.

cowanmax commented 8 years ago

Hello javiercordero, I have done it but font size did't change :((

cowanmax commented 8 years ago

100px does't work also I can't view another sizes, for ex. 110px, 120px etc..

Cuperino commented 8 years ago

TL;DR answer:

Replace fontSize_sizes: '36/36px;48/48px;50/50px;55/55px;60/60px;65/65px;72/72px;80/80px;85/85px;90/90px;95/95px;100/100px', at line 229 of index.html, with fontSize_sizes: '0.6x/0.6em;0.7/0.7em;0.8x/0.8em;0.9x/0,9em;1.0x/1em;1.1x/1.1em;1.2x/1.2em;1.3x/1.3em;1.4x/1.4em;1.5x/1.5em;1.6x/1.6em;1.7x/1.7em;1.8x/1.8em;1.9x/1.9em;2.0x/2em',

Full answer:

My bad. On v2.0b 16.03.23.0, We moved all of CKEditor's configuration from ckeditor/config.js to index.html, in order to make it easier for us and for users to update and move across CKEditor versions without loosing their configurations.

As for v2.0b 16.03.26.0 you can configure CKEditor by editing CKEDITOR.inline( 'prompt', { ...'s parameters, at line 202 of index.html. Because the configuration is parsed as object arguments to CKEDITOE.inline, it should use the following format, line 229 of index.html: fontSize_sizes: '36/36px;48/48px;50/50px;55/55px;60/60px;65/65px;72/72px;80/80px;85/85px;90/90px;95/95px;100/100px,120/120px;140/140px;160/160px;180/180px;200/200px',

Notice how instead of config.fontSize_sizes = now it's just fontSize_sizes:.

Also, using absolute values for font-sizes could cause multi-window synchronization to break, therefore relative font values such as em or vw should be used, like this: fontSize_sizes: '0.6x/0.6em;0.7/0.7em;0.8x/0.8em;0.9x/0,9em;1.0x/1em;1.1x/1.1em;1.2x/1.2em;1.3x/1.3em;1.4x/1.4em;1.5x/1.5em;1.6x/1.6em;1.7x/1.7em;1.8x/1.8em;1.9x/1.9em;2.0x/2em',

Additional changes to the CSS may be required for the UI to look better, but it should perform best using em.

Last but not least, have in mind that since it's good practice to separate javascript from html, it's highly probable that we'll eventually move this configuration code into js/editor.js or into a separate file. We'll write it in the documentation later.

cowanmax commented 8 years ago

Thanks for your great answer ! Now all is ok! Respect !!!

Cuperino commented 8 years ago

You're welcome! Thank you too! If it wasn't for you the bug would probably have gone unnoticed for this release. I've updated the development branch with the fix.