Re: [gedit-list] using gedit get_active_document



Hi,

You can do this:

doc = self._window.get_active_document()
location = doc.get_location()
uri = location.get_uri()


2012/12/14 Wendell MacKenzie <mackendw gmail com>
Hi:

   I'm writing a plugin for gedit.  I need to analyze the text of the document to check it for syntax.

   To do this, in the plugin, I'm doing:

doc = self._window.get_active_document()

fileString = doc.to_string()

   This doesn't work.  Any idea how I can get the text of the active doc and hold in the plugin so I can deal
with it as a string?

Many thx.
W. MacKenzie


_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]