ImaginarySense / Imaginary-Teleprompter

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

Change style #2

Closed cowanmax closed 8 years ago

cowanmax commented 8 years ago

Hi guys ! Thanks for your great job! I have tested a lot of prompters (also not freeware) - you are the best :) But pls tell me how I can change prompter style. I need to set Whiteboard by default. I have changed index.html `

          <select class="form-control" id="prompterStyle" name="prompterStyle" onchange="OnChange(this.form.prompterStyle);">
            <option value="0">Blackboard</option>
            <option value="1" selected="selected">Whiteboard</option>
          </select>`

after that in a Output window I have a whiteboard by defauld, but I also need to refresh page (index.html) to change prompter editor. Thanks!

va2ron1 commented 8 years ago

Hi! Thanks for using our prompter! Add the following code in the index.html:

CKEDITOR.on('instanceReady', function(){ document.getElementById("prompterStyle").selectedIndex = 1; document.getElementsByTagName('iframe')[0].contentWindow.document.body.style.background="#FFF"; document.getElementsByTagName('iframe')[0].contentWindow.document.body.style.color="#000";});

after CKEDITOR.replace('teleprompterdata'); at line 207

Cuperino commented 8 years ago

Hello @cowanmax! I'm glad to hear you like our Teleprompter!

I want you to know we'll soon be adding a "remember settings from last session" feature to the next release, version 2.0. You may check it out in the development branch, it's pretty stable. https://github.com/imaginaryfilms/Teleprompter/tree/development

Let us know if @va2ron1's code works for you.

Javier

cowanmax commented 8 years ago

Hello javiercordero ! Thanks for your link. I have download dev pack. It works very well! But have the same problem. I need to start prompter with Whiteboard as default. How I can change it?

Hi va2ron1 ! Unfortunately I can't understand you. Where I need paste your code in index.html: CKEDITOR.on('instanceReady', function(){ document.getElementById("prompterStyle").selectedIndex = 1; document.getElementsByTagName('iframe')[0].contentWindow.document.body.style.background="#FFF"; document.getElementsByTagName('iframe')[0].contentWindow.document.body.style.color="#000";});

va2ron1 commented 8 years ago

Just in the red line: http://postimg.org/image/s0najjkit/

cowanmax commented 8 years ago

@va2ron1 Thanks, was fix it ! Could you tell me where I can change it in development version ?

va2ron1 commented 8 years ago

Pull the latest development version and in the init function of the editor.js you need to change both values of the style from 0 to 1.

Cuperino commented 8 years ago

Hello!

I made a small improvement to @va2ron1's fix. To change the default from now on, you only need to move the selected tag in index.html, as you did on your original comment.

Hope this works!

cowanmax commented 8 years ago

Thanks ! It works :)