Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2020, 11:50 PM   #1
koq
Junior Member
koq began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2020
Device: tablet
Guidance on using Sigil

Hi,

Really interested to get a depth information regarding on using Sigil especially on how to integrate Javascript...

Thank you.
koq is offline   Reply With Quote
Old 12-29-2020, 11:15 AM   #2
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 13,465
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Hello and welcome to MobileRead!

Please use the report button under your username (on the right side of the karma button) and ask the moderators to move your post to the Sigil subforum:
https://www.mobileread.com/forums/fo...play.php?f=203
Sirtel is online now   Reply With Quote
Advert
Old 12-29-2020, 11:18 AM   #3
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,935
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Moved.
pdurrant is offline   Reply With Quote
Old 12-29-2020, 11:56 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by koq View Post
Really interested to get a depth information regarding on using Sigil especially on how to integrate Javascript...
Sigil supports JavaScript, including local storage, but doesn't come with any special JavaScript tools, except for the Preview window, which allows you to run JavaScript.

What do you want to use JavaScript for?
Doitsu is offline   Reply With Quote
Old 12-29-2020, 11:57 PM   #5
koq
Junior Member
koq began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2020
Device: tablet
Quote:
Originally Posted by Doitsu View Post
Sigil supports JavaScript, including local storage, but doesn't come with any special JavaScript tools, except for the Preview window, which allows you to run JavaScript.

What do you want to use JavaScript for?
Actually, I tried to use the Javascript coding from codepen.io example as my learning process to explore Sigil. However, the script did not work as in codepen. I also would like to know whether React.js can be incorporating in Sigil?

I did Javascript in external file (Misc folder) and put the name of the script file in the src (source) attribute of a <script> tag:

<script src="/Misc/myScript.js"></script>

However, it did not work..

Thank you.
koq is offline   Reply With Quote
Advert
Old 12-30-2020, 07:43 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by koq View Post
I also would like to know whether React.js can be incorporating in Sigil?
I haven't tested this, but in theory, all JavaScript frameworks without external dependencies should work.

Quote:
Originally Posted by koq View Post
I did Javascript in external file (Misc folder) and put the name of the script file in the src (source) attribute of a <script> tag:
Depending on the code, you might have to explicitly reference JavaScript code with onload. For example:

Code:
<body onload="myFunction()">
Here are two very simple sample epubs with JavaScript created with Sigil:

Epub1
Epub2

However, before you spend more time on this, you might want to consider the fact that only a handful of epub3 apps actually support JavaScript.
Doitsu is offline   Reply With Quote
Old 12-30-2020, 09:01 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,568
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by koq View Post
I did Javascript in external file (Misc folder) and put the name of the script file in the src (source) attribute of a <script> tag:

<script src="/Misc/myScript.js"></script>

However, it did not work. Thank you.
Unless you've modified the structure of your epub to have the Misc folder at the root of the archive, I wouldn't expect the src path you specified to work.

I would think you'd need to provide a src path that is relative to the location of the html file the script tag is a part of.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guidance with library Tadario Library Management 6 07-13-2016 05:28 PM
Recipe request (or guidance) tavegyl Recipes 2 07-19-2014 04:26 AM
Need guidance tidegirl Which one should I buy? 12 03-26-2014 11:11 AM
New to Linux, need some guidance! KindleMan Sony Reader Dev Corner 6 03-10-2008 11:53 AM
Guidance needed Tom Storer Which one should I buy? 7 12-03-2007 02:09 AM


All times are GMT -4. The time now is 07:22 AM.


MobileRead.com is a privately owned, operated and funded community.