You need to use EasyEDA editor to create some projects before publishing
API Error: extId is required on createCommand
715 2
andreasbernhofer 5 years ago
Hi, I wanted to try to create an extension, but I ran into the error "extId is required" as soon as I call api('createCommand', { ... }). I copied the code from[https://github.com/dillonHe/EasyEDA-Documents/blob/master/API/example/theme/main.js](https://github.com/dillonHe/EasyEDA-Documents/blob/master/API/example/theme/main.js) and pasted it into Tools -> Extensions -> Run Script. Also tried this simple code in Tools -> Extensions -> Run Script: `api('createToolbarButton', {` `    title:'Shape',` `    fordoctype:'pcb',` `    "menu" : [` `        {"text":"Log Selection", "cmd":"extension-debugshape-log"},` `    ]` `});``api('createCommand', {` `    'extension-debugshape-log' : function() {` `        console.log(api('getSelectedIds'));` `    }` `});` Toolbar button shows up, but same error on createCommand Since I found no documentation ... what is wrong?
Comments
duritskiy 5 years ago
IT WOULD HELP YOU [https://easyeda.com/forum/topic/Share-your-own-scripts-and-Extensions-here-3ef2feca9adc45f0a0f311029c3dcdc9](https://easyeda.com/forum/topic/Share-your-own-scripts-and-Extensions-here-3ef2feca9adc45f0a0f311029c3dcdc9)
Reply
andreasbernhofer 4 years ago
Okay, I found out how to use it. I created my own example: [https://github.com/xsrf/easyeda-extension-example](https://github.com/xsrf/easyeda-extension-example)
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice