Left-align, no hyphens
-
I would like to have the text left-aligned only, not double-justfied; also, and no hyphens. The following does not work. What does?
style=”border:none;text-align:left;”The page I need help with: [log in to see the link]
-
There isn’t a way to do that at the moment, I’ll look into it for the next release. In the meantime, if in your website you want the text of the ebooks always left aligned and with no hyphens, I may be able to provide you with a custom version of the plugin with that setting enabled.
If you only want a specific ebook to have that setting, another immediately feasible workaround would be to insert the necessary styles directly in the ebook. The style rule would need to have selectors with higher specificity than the ones set by the viewer, which as of version 1.1.0 is:
p, li, blockquote, dd {
text-align: justify;
-webkit-hyphens: auto;
hyphens: auto;
}So, you would probably need to add a class or use something like
body p, body li, body blockquote, body ddas selectors.“In the meantime, if in your website you want the text of the ebooks always left aligned and with no hyphens, I may be able to provide you with a custom version of the plugin with that setting enabled.”
Yes, I would like that. Much appreciated.
Will this custom version be over-written when your plug-in updates on WordPress?
-
This reply was modified 1 month ago by
cookiejaropen.
Hold on, in simebv-viewer-V_21dGPf.js I could:
justify!0 → justify!1
hyphenate!0 → hyphenate!1But that will surely be over-written with an update.
I could not figure out a way to show “Read aloud…” by default.
In the most recent version of the plugin, the name of the file should be just simebv-viewer.js, without the hash at the end. Aside from that, that is more or less the change I did in the custom version.
I shared with you the zip file of the customised plugin, which also shows the text-to-speech controller.
All the changes will be overwritten with the next update, which should include the shortcode attributes for those preferences.
The custom plug-in:
✔ Left-aligned
✔ No hyphensI cleared the cache and restarted the browsers to test Read aloud…
It does show on MacOS Safari, however the player obscures the book’s title.
The only text-to-speech voice options are local. I thought there were higher quality remote voices in a prior version.
Read aloud… does not show automatically on iOS.
Read aloud… does not show on Vivaldi (desktop or iPhone) nor on Comet (again, desktop or iPhone). Problem with Chrome?
Test shortcode:
[simebv_viewer book=”pause-generic” layout=”scrolled” max-pages=”1″ default-font-size=”large” page-margins=”large” pagination-style=”percent” activate-color-filter=”true” bg-transparent-filter=”false” bg-color-filter=”#f2ede8″ style=”height:50em;border:none”]
-
This reply was modified 1 month ago by
cookiejaropen.
The available voice options are browser and system dependent. For example, with Chrome on Windows, you should have the local installed voices and the Google’s remote ones, in Edge you should have the local and the Microsoft’s remote ones, in Firefox you should have only the local ones.
The position of the text-to-speech controller is always at the top of the viewer, regardless of whether it has been manually activated or not.
I updated the customised version, let me know if that works consistently among browsers.
The latest version unfortunately brings back double justification and hyphens. Even tinkering with the JS as before cannot stop the double justification and hyphens. I will try to find an old version of the plug-in and downgrade. Perhaps others will have better results than I do. For now, double justification cannot be stopped.
V. 1.1 with justify!0 → justify!1 hyphenate!0 → hyphenate!1 works on all devices. Hooray! I can live without automatically showing Read aloud… since the player covered the book title. Thanks for your help, Francesco. Excellent, much-needed plug-in.
What’s strange is that the code that manages text justification and hyphenation is exactly the same in the two versions that I shared with you, so I’m not sure what the cause might be for the different results.
Anyway, I’m glad that you found/wrote what works for you, in the next public version I’ll try to add justification and hyphenation as customisable options, you’ll need to update the shortcodes with the appropriate attributes before updating the plugin to not lose your settings.
About the text-to-speech controller, maybe I’ll add a handle to move it around… But we’ll see, I’ll think about it.
-
This reply was modified 1 month ago by
You must be logged in to reply to this topic.