What workflow you use when scripting Javascript in Lectora Online 3 ?

Allrighdie guys and gals.

I now use Jquery, GSAP and several other Javascript Libraries in my workflow when developing in Lectora. Using a HTML-extension set to Meta tags to import my libraries, and then use either Javascript calls on Lectora buttons or functions setup in a JS-file. Mostly a combo of both.

This worked fine for me in Lectora Inspire 11, and also got it working in Online 3.

The thing i bump into now is, that i donot like the efficiency of my workflow in Online.

Going in and out scripts a lot in L11, previewing and finetuning it...

Well that does not work as good and fast in Online3 anymore. At least my workflow.

So what i was wondering if anyone has a better workflow for coding Javascript for Online3,

i might overlook a simple setup that helps me.

Kind regards,

Math

Discussion (10)

Hi Math,

Thanks for the feedback. Is it the time for page preview (in browser) that is making your workflow inefficient? I am curious because we are looking at a few enhancements to make it easier for authors to weave in scripting and I hadn't really thought of this issue.

One thing I do when I am doing the rough sketching for some scripting is to download the published content, then extract it to my local drive. Then I load the course in Chrome and use the debugger to work on the files. Chrome will let you modify and save the scripts (Edit JavaScript in Chrome) while you are also debugging and fine tuning.

We realize it is way more efficient to be able to do this in Lectora Online. I sometimes use the browser debugger to try out specific statements when I am doing a page preview. I imagine you use the browser debugger already, but for people who don't it might be something to learn about.

I am really glad you are posting your feedback here! We want to make it as easy as possible to enhance your courses with all the technologies that are available.

Joe - Lectora Online Team

undefined

My desktop workflow for scripts is simple:

1. Create a "my-custom-scripts.js" file, attach it to Lectora project, initialize it with Ext HTML Object.

2. Open the file in Sublime (Notepad++, Brackets, what have you) and edit it in there.

If I had to re-upload the edited file every time, that would make my workflow a nightmare.

Ideally, I'd see a way to edit the script file online (just like I can edit images online) in a convenient editor. Doesn't have to be the most powerful editor of all times with code autocompletion etc. Here's a list of basic features I would like to see:

1. Monospaced font

2. Pressing Tab key creates a 2 spaces instead of jumping from the text input field to OK button.

3. JS Syntax highlighting (e.g. https://highlightjs.org/)

Hi Joe,

Thx for your reply. Good tip anyway about the download of content. Never thought of that one :-)

Indeed the time needed for a preview is hindering my workflow.Also the fact i cannot change an existing JS file once i imported it in Lectora Online is a nuisance. Thus need to change it offline, upload and replace it ( as a additional file in my project )

Furthermore the difference in html-names between Lectora Online and Lectora Inspire/Publisher ( version 11 and Beta 16 ) is not nice. No chance of creating tests in Inspire/Publisher that then work flawless in Online. Online uses tobj for all html-names whereas Inspire/Publisher have image and text as preset for all html-names.

Another missing step in Online is the preview for a specific browser. I do know ( read that in another post onhere somewhere ) you can copy and paste the output-link to another browser.. but having the option of directly sending it to your browser of choice would be better and quicker.

For me for now Online3 is not my tool of choice when developing Javascript. Inspire 11 or the Beta of 16 do work better for me. If you guys there improve the export/import of Lectora packages into Online3, so that no extra code refactoring is needed to get a project working in Online3...that would be great too :-)

Do love Lectora anyway though, for its flexibility in working with Javascript to improve projects. Use javascript game-engines and 3d libraries to get astounishing endresults. Most clients and collegues end up saying...'Wow, never knew that was possible'..

Kind regards,

Math

PS. some Javascript libraries are really worthwhile bringing them into Lectora as a default. For me that is Greensocks GSAP !

Totally agree with Sergey.

My desktop workflow is exactly like his. Using a JS to include several libraries and custom scripts.

Also use Sublime.

If you guys know of any online editors that would cater to those needs let me know for sure. I'll start looking also as I agree that would be a great addition along side our other external tools. If not I guess i'll have to make it :)

I'll add this as a user story to our list of enhancements so that we can consider it for future updates (and brainstorm).

undefined

Codepen is the online editor Greensock suggests whenever users of GSAP have issues or questions. Works quite well.

http://codepen.io/pens/

We do have an improvement issue in our backlog for this(LO-1896). Thanks for all the great input.

As of Lectora Online 3.0.3 we have the ACE editor integrated for editing your scripts.

Thx Joe, great.. any plans for integrating it in Inspire too ?

That's the plan, we are looking at what makes sense for that platform (desktop). Darin definitely want's to get this in.

Discussions have been disabled for this post