ve.dm.Document contains a cache of nodes by type which you can access with
ve.dm.Document.prototype.getNodesByType:

ve.init.target.surface.model.documentModel.getNodesByType( 'mwHeading',
true );

This appears to work for the initial document, but may be broken with
regards to newly added nodes.

On Tue, 26 May 2020 at 10:43, Egbe Eugene <agboreug...@gmail.com> wrote:

> Hi All,
>
> I am using the VE model in a Gadget and I am wondering how can I get the
> headings which have been entered on the VE surface for further processing
>
> Thanks
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to