On Jul 10, 12:49 pm, whatever <kbrezov...@gmail.com> wrote:
> Suppose I have a plugin which I need to modify to suit my needs. Let's
> take Vincent's EditTable (1) for example. Works nicely, but I need to
> insert two lines to remove and then reapply a style. Now, the plugin
> is probably gonna evolve, but the location where I need to insert my
> lines will stay the same.
> Is there a way to somehow write a script that would get the text of
> the plugin and do a replace to insert the lines, before that plugin is
> actually loaded, so that the added lines would be executed as part of
> the plugin? I'd like to avoid having to manually change the plugin
> whenever it is updated and I'd like avoid modifying the source.

TW plugins are loaded in alphanumeric order.  This means that a
function can be defined by one plugin (e.g, EditTablePlugin) and then
overridden by another plugin, as long as the second plugin's title
comes after the first plugin in the sort order (e.g.,
EditTablePluginTweaks).  Start by finding the specific function(s) of
the first plugin that you want to modify.  Copy/paste those function
definitions into the second plugin.  Then make your changes there.
When you save-and-reload your document the plugins your modified
functions take effect, without having to alter the original plugin in
any way... and, when there is an update to the original plugin, your
changes are unaffected and will continue to work, as long as the
overridden functions in the original plugin have not been
significantly modified.

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to