0.0.10 • Published 2 years ago

jsme-vue v0.0.10

Weekly downloads
-
License
3-clause BSD
Repository
github
Last release
2 years ago

JSME Vue

Vue wrapper for JSME-Editor

Background

SMILES is a means of specifying the molecular structure of a chemical species as a string.

This component wraps JSME-Editor in an easy to use Vue component. All credit to the original authors (Peter Ertl and Bruno Bienfait), as this package simply makes their chemical drawer easier to use in a Vue app. The core JSME-Editor is initialized by adding a script to the document head, which adds several more scripts neccessary for the editor to load and function.

Installation

jsme-vue is available via npm: npm i jsme-vue

Example Usage

Used in a Vue component, using Composition API.

<template>
  <div class="mx-auto bg-blue-100 flex flex-row items-end">
    <JSME v-model="smiles" />
  </div>
</template>

<script setup lang="ts">
import { ref, watch } from "vue";

const smiles = ref("c1ccccc1");

watch(smiles, () => {
  // Perform action on smiles change.
  console.log(smiles.value);
}

</script>
0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago