partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
248 stars 61 forks source link

how to set read only for composer #234

Open niuzhenjiang opened 3 years ago

niuzhenjiang commented 3 years ago

i have needs: to set readonly for composer, let users only read, can't edit,how can i do it ? thanks

partridgejiang commented 3 years ago

You can disable all editing functions by setting the enabled property of the composer:

composer.setEnabled(false);

However, for a readonly molecule displaying, perhaps the Kekule.ChemWidget.Viewer widget is more suitable than the composer.