e... - VerySource" />

enml-js
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Evernote's ENML library in Javascript
enml-js
===========

[Evernote's ENML](http://dev.evernote.com/doc/articles/enml.php) utitlity for Javascript.

```

> enml.ENMLOfPlainText("Hello\nWorld!!")
"\n
Hello
\n
World!!
\n
" > enml.PlainTextOfENML('\n
Hello
\n
World!!
\n
') "Hello\nWorld!!" ``` ### Node.js npm install enml-js ### Browser Functions ============ **enml.ENMLOfPlainText**(String) - Encode a given plain text into ENML format. **enml.PlainTextOfENML**(String) - Translate ENML content back into normal plain text. > enml.PlainTextOfENML('\n
Hello
\n
World!!
\n
') "Hello\nWorld!!" **enml.HTMLOfENML**(String, [ Resources ]) - Translate ENML to HTML for viewing in browsers. > enml.HTMLOfENML('\n
Hello
\n
World!!
\n
') '
Hello
\n
World!!
\n' This function accepts an array of Resource object from Evernote Official Javascript SDK as the second parameter. Those resources (img, audio, video) will be embeded into HTML using base64 data encoding. ```javascriptd var client = new evernote.Client({token: AUTH_TOKEN }); var noteStore = client.getNoteStore() noteStore.getNote(noteGuid, true, true, true, true, function(err, note){ var html = enml.HTMLOfENML(note.content, note.resources); //... }); ``` **enml.TodosOfENML**(String) - Extract Todo items in a given ENML text. > enml.TodosOfENML('Task1
Task2
With Bold Italic and Underline
With Color
') [ { text: 'Task1', checked: false }, { text: 'Task2', checked: true }, { text: 'With Bold Italic and Underline', checked: false }, { text: 'With Color', checked: false } ] **enml.CheckTodoInENML**(String, Int, Bool) - Rewrite ENML content by changing check/uncheck value of the TODO in given position. > enml.CheckTodoInENML('Task1
Task2
With Bold Italic and Underline
With Color
',0, true ) Task1
Task2
With Bold Italic and Underline
With Color
'

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。