11-28-2015, 11:39 AM | #16 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
11-28-2015, 11:40 AM | #17 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Guess thats not possible as the plugin launcher does not know here the cursor position is/was.
|
Advert | |
|
11-28-2015, 05:24 PM | #18 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Simply add a unique tag or id or class name to current tab where you want the insert to occur and invoke the plugin. The plugin will get the list of the current xhtml file (highlighted in the BookBrowser) and can easily look for the unique tag, or id or class name to get any insertion point and substitute anything you want inside the plugin.
KevinH |
11-28-2015, 06:09 PM | #19 | |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Somehow I don't feel inclined to add code that'd save the OP one key-press and one mouse-click. |
|
11-29-2015, 01:09 PM | #20 | |
Connoisseur
Posts: 56
Karma: 70350
Join Date: May 2013
Device: Kobo AuraH2O, Glo, AuraHD, JBC2
|
Quote:
Thanks, SH |
|
Advert | |
|
11-29-2015, 01:24 PM | #21 | |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
img.save(clipboard_data, 'jpeg', quality=90) However, changing the quality to 100 is not recommended, because it'll make the image larger than the original image. If you want to insert the image unchanged, copy the image URL to the clipboard. |
|
02-02-2017, 12:24 PM | #22 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: Boox Onyx i86
|
Thanks for this! GREAT idea for a plugin!
I was using a v0.6 Sigil to paste from a website and build ePubs--and the images worked. Once I loaded in Moon+ I noticed they were broken, and in Sigil v0.9.7 there are "Get failed - protocol HTTPS is unknown" errors (╥_╥) I now need to fix 70+ images, so thanks! This will definitely help! I have two usability questions: 1) Could PasteImage take the image URL, add it, AND Insert it at the cursor? That would simplify things by a lot! 2) Could PasteImage parse a clipboard with html info to keep the images, without the extra step? From https://translationchicken.com/2016/...their-oaths16/ Code:
<img src="https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=1400" class="attachment-baskerville-post-image size-baskerville-post-image wp-post-image" alt="arc3interludeiii" srcset="https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=1400 1400w, https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=150 150w, https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=300 300w, https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=768 768w, https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=1024 1024w, https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png 1600w" sizes="(max-width: 1400px) 100vw, 1400px" data-attachment-id="2919" data-permalink="https://translationchicken.com/arc3interludeiii/" data-orig-file="https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png" data-orig-size="1600,900" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="arc3interludeiii" data-image-description="" data-medium-file="https://translationchicken.files.wordpress.com/2016/09/arc3interludeiii.png?w=300" data-large-file="?w=736" width="1400" height="788"/> </div> <div class="post-content clear"> <h6 style="text-align:left;">*******Note from Translation Chicken*******</h6> If this code was on the clipboard, could PasteImage be changed to paste it better? Thanks again for a great plugin! |
02-02-2017, 12:37 PM | #23 | |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Tools > External Links > Check external links Tools > External Links > Download external resources There are also a couple of browser plugins that'll save websites as ebooks, e.g. dotEpub. |
|
02-02-2017, 02:04 PM | #24 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: Boox Onyx i86
|
Oh, neat! I did not know it did that.
Thanks! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Clipboard Search | kiwidude | Plugins | 29 | 04-02-2024 10:05 PM |
new feature request - paste image support | dhdurgee | Sigil | 16 | 11-22-2015 06:29 AM |
Troubleshooting Paste wifi password into text file? | garyyoung | Amazon Kindle | 9 | 07-08-2014 12:15 AM |
How do I copy and paste an image into the body? | Gregg Bell | Feedback | 26 | 02-06-2013 10:42 PM |
copy and paste with image pdf | kab | enTourage Archive | 12 | 04-27-2010 02:32 PM |