office-text-extractor icon indicating copy to clipboard operation
office-text-extractor copied to clipboard

Allow overriding built-in extractors

Open JonathanVelkeneers opened this issue 7 months ago • 0 comments

Description

It would be a nice feature if we could override the built-in extractors.

This could be achieved as simple as changing https://github.com/gamemaker1/office-text-extractor/blob/main/source/lib.ts#L59 from this.methods.find to this.methods.findLast or alternative. This way the last extractor added by the user will be picked.

Why

If you want to use a different implementation of text extraction (ex: pdf through AI OCR).

Alternatives

Currently you would need to do an IF check on mime type before calling extractText, and then call your own function instead.

JonathanVelkeneers avatar Mar 26 '25 11:03 JonathanVelkeneers