View Single Post
Old 03-02-2017, 11:48 AM   #8
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,849
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, I took a closer look at how "strike" is implemented in BookView. BookView is simply live editing an existing html page. To do that you put the page in "designMode" and then can more easily run a number of commands using javascript with the "document.execCommand(blah)" and it operates on the currently selected text all automatically controlled by the browser's webkit widget.

BookView uses this interface correctly and uses the "strikeThrough" command to toggle strikeThrough on and off. How that is actually accomplished is browser (ie. webkit in this case) dependent. For Qt's webkit, they appear to be using the old "strike" tag and not "del".

See this page that documents this standard designMode interface and its commands:

https://developer.mozilla.org/en-US/...nt/execCommand

So there is no easy way for Sigil to change this without having to write our own javascript to get the current selection and then wrap this in "del" tags all in a live html page under designMode. You can of course do this already in Sigil with clips and things at the code level (CodeView)

It simply is not worth the time for us to spend changing it in BookView or adding a filter workaround to replace all strike tags with del tags (as that can easily be accomplished by global find and replace or a plugin). And since Webkit has effectively been dropped by Qt, they will not fix this bug. Yet another nail in the BookView coffin.

Hope this explains things.

KevinH

Quote:
Originally Posted by KevinH View Post
The u tag has been undeprecated in html5 and redefined. Either way using css is better.

I will look for and change BookView to use del if possible instead of strike but many of the BookView icon based changes are hardcoded in webkit. That is why I strongly recommend never editing anything other than simple text in BookView. Our plan is to make BookView go away eventually.
KevinH is offline   Reply With Quote