1

I'm new to Meteor and I'm trying to figure out how to use pagedown within Meteor.

I added the 3 main files (Markdown.Converter.js, Markdown.Sanitizer.js and Markdown.Editor.js) in client/lib but this does not work.

There is an error in the console:

Uncaught ReferenceError: Markdown is not defined in Markdown.Editor.js

Looking at the code, Markdown is defined in Markdown.Converter.js and is needed in the 2 other files.

Also, I have noticed that the Markdown.Converter.js file I added in the lib folder is automatically edited. When I look at it in the browser when the page is rendered, the whole file has been encapsulated into (function(){ ... })();. Why? I guess that explains why Markdown is not accessible in the other files anymore.

I'm missing something. How does this work?

Thanks

4

1 回答 1

1

正如@waffles 提到的,使用包;或将文件放入client/compatibility,而不是client/lib.

于 2015-05-03T04:47:04.693 回答