Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-22-2023, 09:38 AM   #1
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Drag and drop text in 2.0.0

Hi!

I tried the latest release yesterday (2.0.0, Windows 11, 64bits) but dragging and dropping text in the code view is no longer possible. This is a big issue for me as I often have to add language tags here and there for accessibility. For convenience and speed's sake, I have snippets pre-made that I copy/paste where I want the tag to start, then drag the end tag where it should be.
Otherwise, I have to constantly come and go to copy/paste or manually write the code each and every time.

Is it a known issue, an intended behavior, or is there a know workaround other than reverting back to 1.9.30 (which I am doing for now)?

Thanks!
StephV is offline   Reply With Quote
Old 08-22-2023, 09:52 AM   #2
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,344
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That feature was never intended to be enabled. Drag and drop on QPlainTextEdit was supposed to be turned off by default. We explicitly turned it off as crashes were being reported. https://www.mobileread.com/forums/sh...d.php?t=355429
DiapDealer is offline   Reply With Quote
Old 08-22-2023, 09:54 AM   #3
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,344
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you need that sort of full-blown html editor ability you consider using an external editor via Sigil's Open With feature.
DiapDealer is offline   Reply With Quote
Old 08-22-2023, 10:12 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,448
Karma: 5703586
Join Date: Nov 2009
Device: many
Just use Sigil's Clips feature. That is exactly what it was meant to do. Make a clip for each snippet you commonly use. You can even wrap these snippets around currently selected text. See Sigil's Users guide for more info,

Sigil also has the ability to create and inject missing end tags via the menus.

Last edited by KevinH; 08-22-2023 at 10:15 AM.
KevinH is offline   Reply With Quote
Old 08-22-2023, 10:22 AM   #5
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Thanks for the info! Sadly, it means that I have to change the way I work, or I need to stay on 1.9.30, because I often have dozens upon dozens of tags to add. Not being able to drag and drop is a major hurdle for my workflow in general, but using an external html editor will also be a bit of a time loss (albeit lesser than going back and forth constantly to copy and past start and end tags).
I mostly review and enrich files post conversion.
While I understand Sigil was never meant to be a full-blown html editor, it was still agile and versatile enough that I could do everything I needed to do within the same software, and that meant saving a lot of time in general, because I don't have to go back and forth between editors to do x specialized thing, then back in Sigil for x other more specialized thing, then another software for x and y, and back to Sigil...
Please know that I'm not telling you all that because I'm angry, but just so you understand the needs and maybe (maybe!) re-enable it in the future once it become safe to do again.
StephV is offline   Reply With Quote
Old 08-22-2023, 10:23 AM   #6
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Quote:
Originally Posted by KevinH View Post
Just use Sigil's Clips feature. That is exactly what it was meant to do. Make a clip for each snippet you commonly use. You can even wrap these snippets around currently selected text. See Sigil's Users guide for more info,

Sigil also has the ability to create and inject missing end tags via the menus.
Thanks for the suggestion, I'll definitely check that out!
StephV is offline   Reply With Quote
Old 08-22-2023, 10:39 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,344
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by StephV View Post
While I understand Sigil was never meant to be a full-blown html editor, it was still agile and versatile enough that I could do everything I needed to do within the same software, and that meant saving a lot of time in general, because I don't have to go back and forth between editors to do x specialized thing, then back in Sigil for x other more specialized thing, then another software for x and y, and back to Sigil...
Have you tried Sigil's Open With feature? Once you have configured an editor (or a couple). It's as simple as right-clicking a file in Book Browser and selecting the editor to open it in. Then when you are done, the file will be reloaded in Sigil with the changes. It's not really "going back and forth" between Sigil and another editor--closing/reopening, etc... It's merely substituting another html editor for Sigil's built-in one.

Last edited by DiapDealer; 08-22-2023 at 10:47 AM.
DiapDealer is offline   Reply With Quote
Old 08-22-2023, 10:56 AM   #8
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Quote:
Originally Posted by DiapDealer View Post
Have you tried Sigil's Open With feature? Once you have configured an editor (or a couple). It's as simple as right-clicking a file in Book Browser and selecting the editor to open it in. Then when you are done, the file will be reloaded in Sigil with the changes. It's not really "going back and forth" between Sigil and another editor--closing/reopening, etc... It's merely substituting another html editor for Sigil's built-in one.
Yeah, I programmed Notepad++ into it, until 2.0.0 I didn't see the need to use it much if at all. I'll try different things today and see what works best between the clips and the external editor.
It's just that I usually do more than just code review in one go, because we convert a lot of files from PDF, and that introduces typos... So Sigil has the big perk of allowing me to review and enrich code + at a glance find a few typos (and more using the spellcheck tool later in my process).
I also have co-workers that I will need to teach whatever alternative I decide on se we're all on the same page. But that part is a me-problem!
StephV is offline   Reply With Quote
Old 08-22-2023, 11:13 AM   #9
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,344
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Understood. Everyone's workflow is different.
DiapDealer is offline   Reply With Quote
Old 08-22-2023, 11:55 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,448
Karma: 5703586
Join Date: Nov 2009
Device: many
As a compromise, we had added code to allow drop in CodeView, but only if a specific environment variable is set by the user.

This will be an entirely unsupported feature (meaning no bug reports concerning it will be accepted).

So starting with the quickly forthcoming (maybe tonight) Sigil-2.0.1 release:

setting the following environment variable:

SIGIL_ALLOW_CODEVIEW_DROP

to have the value 1 before launching Sigil should allow your old workflow to continue.

Hope this helps.
KevinH is offline   Reply With Quote
Old 08-22-2023, 12:02 PM   #11
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
Just use Sigil's Clips feature. That is exactly what it was meant to do. Make a clip for each snippet you commonly use.
Yep! Exactly!

Using the Clips Editor

You can add/edit all your clips by pressing:
  • Tools > Clips Editor (Ctrl+Alt+C)

Then you can create multiple Clips to help mark up languages like:

- - -

Name: English
Text: <span class="english" lang="en" xml:lang="en">\1</span>

Name: French
Text: <span class="french" lang="fr" xml:lang="fr">\1</span>

Name: German
Text: <span class="german" lang="de" xml:lang="de">\1</span>

- - -

Side Note: See the \1? In Clips, that means Sigil will insert "whatever you have highlighted" in that spot!

Side Note #2: If you constantly find yourself copying/pasting/inserting large "templates" of code, Clips are great for that too!

- - -

Setting Up the Clips Window/Toolbar

Now, if you press:
  • View > Clips

you can show an easy-to-click window of all your Clips. For example, I set mine up in Sigil's lower-left corner:

Click image for larger version

Name:	Sigil.2.0.-.Clips.Window.png
Views:	319
Size:	22.3 KB
ID:	203269

Or, if you prefer toolbars, you can:
  • View > Toolbars > Clips Bar
  • View > Toolbars > Clips Bar2

to enable extra toolbars up top:

Click image for larger version

Name:	Sigil.2.0.-.Clips.Toolbar.png
Views:	306
Size:	22.3 KB
ID:	203270

Actually Using The Clips!

Now, if you had text like:

Code:
<p>This is an example of English.</p>
<p>This is an example of François.</p>
<p>This is an example of Deutsch.</p>
you can:
  • Highlight your word/sentence/text/code.
  • Click on a Clip.

and Sigil will insert that Clip code (around your highlighted text):

Code:
<p>This is an example of <span class="english" lang="en" xml:lang="en">English</span>.</p>
<p>This is an example of <span class="french" lang="fr" xml:lang="fr">François</span>.</p>
<p>This is an example of <span class="german" lang="de" xml:lang="de">Deutsch</span>.</p>
Click image for larger version

Name:	Sigil.2.0.-.Clips.Language.Marked.png
Views:	311
Size:	23.7 KB
ID:	203271

- - -

Quote:
Originally Posted by StephV View Post
It's just that I usually do more than just code review in one go, because we convert a lot of files from PDF, and that introduces typos... So Sigil has the big perk of allowing me to review and enrich code + at a glance find a few typos (and more using the spellcheck tool later in my process).
You'll probably want to read a ton of all my tips/tricks.

I've written 2200 posts since 2012 all about this PDF->ebook + ebook conversion + ebook cleaning stuff.

For example, you can probably type this into your favorite search engine:

Code:
Sigil clips Tex2002ans site:mobileread.com
language markup Tex2002ans site:mobileread.com
and come across many of my explanations/tutorials, like:

On PDF->EPUB itself... you may be interested in my recent posts in:

Quote:
Originally Posted by StephV View Post
I also have co-workers that I will need to teach whatever alternative I decide on se we're all on the same page. But that part is a me-problem!
Oh? What's the project? Do you work for a publisher?

Last edited by Tex2002ans; 08-22-2023 at 12:12 PM.
Tex2002ans is offline   Reply With Quote
Old 08-22-2023, 12:03 PM   #12
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Quote:
Originally Posted by KevinH View Post
As a compromise, we had added code to allow drop in CodeView, but only if a specific environment variable is set by the user.

This will be an entirely unsupported feature (meaning no bug reports concerning it will be accepted).

So starting with the quickly forthcoming (maybe tonight) Sigil-2.0.1 release:

setting the following environment variable:

SIGIL_ALLOW_CODEVIEW_DROP

to have the value 1 before launching Sigil should allow your old workflow to continue.

Hope this helps.
I understand the risks. Thank you tons!
StephV is offline   Reply With Quote
Old 08-22-2023, 12:11 PM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,448
Karma: 5703586
Join Date: Nov 2009
Device: many
And I agree with Tex2002ans as he explained, Clips is a better/safer way of handling/inserting commonly used strings (tags, attributes, etc).

You might want to also look into SavedSearches and Find&Replace lists that can even be automated. See the Sigil User's Guide for more info.
KevinH is offline   Reply With Quote
Old 08-22-2023, 12:14 PM   #14
StephV
Member
StephV began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2020
Device: none
Quote:
Originally Posted by Tex2002ans View Post
Oh? What's the project? Do you work for a publisher?
I work for an aggregator/distributor and we offer a conversion service for our customers (publishers). We handle reflowable, FXL, accessible and non-accessible titles. I handle the review/corrections/adjustments parts so I learned to do a little bit of everything from coding to dabbling a little in minor graphic editing. Let's just say I'm the do-it-all person of eBooks at my job

Thank you for the tips, I'll take a look at them for sure!
StephV is offline   Reply With Quote
Old 08-22-2023, 12:28 PM   #15
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
And I agree with Tex2002ans as he explained, [...]

You might want to also look into SavedSearches and Find&Replace lists that can even be automated. See the Sigil User's Guide for more info.
Yes, and don't forget the awesome "Saved Searches" trick using Groups to run multiple find/replaces in a row:

That's one of the ultimate time-savers.

Like I just have a big ol' list of search/replaces that cleans up Finereader output + common OCR issues:

within a few minutes, I'd have a reasonably clean file—at least compared to the raw output—(see the Archive.org "EPUB" vs. my quickly-OCRed+cleaned EPUB).

Quote:
Originally Posted by StephV View Post
I work for an aggregator/distributor and we offer a conversion service for our customers (publishers). We handle reflowable, FXL, accessible and non-accessible titles. I handle the review/corrections/adjustments parts so I learned to do a little bit of everything from coding to dabbling a little in minor graphic editing. Let's just say I'm the do-it-all person of eBooks at my job
You will be very interested in this post + the articles/talks I linked to:

That links to fantastic stuff describing the reality of updating/maintaining the ebook backlist.
Tex2002ans is offline   Reply With Quote
Reply

Tags
issue


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No more Drag and Drop? hard_boiled Library Management 14 09-29-2013 07:44 PM
Drag and Drop does not work Fossilbooks Kobo Reader 4 05-05-2011 09:27 PM
Drag 'n drop books Toxaris Calibre 0 03-12-2011 01:35 PM
Drag 'n' Drop Perkin Calibre 17 10-06-2010 11:46 AM
Drag and Drop jjjconnon Calibre 11 02-27-2010 11:59 PM


All times are GMT -4. The time now is 12:47 PM.


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