View Single Post
Old 02-20-2015, 03:04 PM   #87
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,746
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by bmix View Post
In it I would like to offer the possibility to apply a style upon the currently opened editor document (would need a way, to find out, which file is being frontmost) or selected or all xhtml files.
Unfortunately, it's not possible to programmatically determine the the .html file currently opened in the Code View window; you'll either have to enumerate all .html files or use a Tkinter file selection dialog. (For an example, see DiapDealer's Smarten Punctuation plugin.)

BTW, for simple html manipulation BeautifulSoup might do the trick.
Doitsu is offline   Reply With Quote