This is very similar to the question posted here but nothing useful was mentioned.
I'm trying to look for documentation on how to create a new EditMode tool for the markup extension. Documentation is very scarce and I can't find the source code for markup extensions. The only thing I can find is here.
I'm trying to decipher this file: https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/Markup/Markup.js but it has a lot of webpack references and is hard to read.
Has anyone managed to create a custom EditMode tool?
A member of my team has managed to find the source for the markup extension:
https://autodeskviewer.com/viewers/latest/docs/extensions_Markup_core_Markup.js.html
Unfortunately, implementing a custom markup type is not officially supported today. The documentation you found (https://autodeskviewer.com/viewers/latest/docs/tutorial-feature_markup.html#create-a-new-drawing-tool-a-new-editmode) is not production ready.
Edit:
While I still believe the markup code is not ready for custom markup implementation, here's a work-in-progress, custom markup tool drawing smiley faces: https://github.com/petrbroz/forge-basic-app/blob/sample/custom-markup/public/smiley-markup.js
In the sample app it is activated with a button click: https://github.com/petrbroz/forge-basic-app/blob/sample/custom-markup/public/main.js#L11-L20
And here it is in action: https://i.sstatic.net/1pAHo.jpg