etherpad-plugins icon indicating copy to clipboard operation
etherpad-plugins copied to clipboard

Expose keywords of chosen "brush"

Open jdittrich opened this issue 10 years ago • 4 comments

Is there any way to access the content of the chosen highlighting scheme aka the "brushes"?

I wrote an Autocomplete-Plugin for Etherpad and it would be great to access ep_syntaxhighlighting’s keyword list and the like to avoid code repetition and to play nicely with the ep_syntaxhighlighting.

jdittrich avatar Dec 05 '14 16:12 jdittrich

That plugin would need to emit an event to hook into it. The usual etherpad way is to be really inefficient and process the same task twice!

JohnMcLear avatar Dec 05 '14 16:12 JohnMcLear

Also a new hook would be welcome if that works!

JohnMcLear avatar Dec 05 '14 16:12 JohnMcLear

Thanks for the info!

That plugin would need to emit an event to hook into it.

Does ep_autocomplete need the hook or ep_syntaxhighlighting?

I assume the best architecture would be having some kind of "backend" component which checks the text for changes and than triggers both the highlighting and the autocompletion – is that along the right lines? (Though I got the autocomplete working I’m not very much into the more advanced workings of Etherpads plugin API…)

jdittrich avatar Dec 05 '14 16:12 jdittrich

Yea I'd expect the hook would go into Etherpad

JohnMcLear avatar Dec 06 '14 15:12 JohnMcLear