Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Highlighting code blocks in vue #76

Open
CSFM93 opened this issue Jan 15, 2021 · 1 comment
Open

Not Highlighting code blocks in vue #76

CSFM93 opened this issue Jan 15, 2021 · 1 comment

Comments

@CSFM93
Copy link

CSFM93 commented Jan 15, 2021

Hi thanks for creating such an amazing library, i have tried to use it but it doesn't highlight code blocks.

The code i tried:

var HyperMD = require("hypermd");

export default {
  name: "MdEditor",
  data: () => ({
    rendered: false,
  }),

  methods: {
    render() {
      if (!this.rendered) {
        var myTextarea = document.getElementById("input-area");
        var editor = HyperMD.fromTextArea(myTextarea, {
          lineNumbers: false,
          mode: {
            name: "hypermd",
            hashtag: true, 
          },
        });
        editor.setSize(null, "900px"); // set height
      }
    },
  },
};
@mikeerickson
Copy link

@CSFM93 Were you ever able to get this working? I have been fighting with this library and cant seem to get it working with Vue. In my case, I always receive an error

Cannot read property 'value' of null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants