diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md deleted file mode 100644 index 5eaf0dc..0000000 --- a/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# rmarked - -## 功能使用 - -引入样式 - -``` -import "rmarked/css/github-markdown.css" -import "katex/dist/katex.min.css" - -//引入高亮的主题,可以改成自己喜欢的 -import "highlight.js/styles/tomorrow-night-blue.css" - -//全局使用 - -var markdown = require("rmarked") -Vue.prototype.markdown_render = markdown - -``` - -## 配置 - - -默认opttions -``` -{ - katex:true, - emoji:true, - image:false, //对image的增强 - image_base:'/' //image基础地址 -} - -``` - -### Emoji表情的使用 - -使用**TWEmoji** - -语法 - -``` -:emoji-code: -``` - -**emoji-cheatsheet** - -https://jollygoodcode.github.io/twemoji/ - -## image - -image可以使用以通过opttions开启增强的功能,默认没有开启`image:false`,使用`marked`的默认功能 - -**image_base** -开启image增加的同时,改变图片相对地址的基地址 - - -语法 -``` -![text](you_image_path=HeightxWidth"title") -``` - -例子: - -开启增强image功能,改变image_base - -``` -{ - image:true, - image_base:'http://rainboy.com/' -} -``` - -``` -原: -![1](1/2/3.jpg=100x200 "mytitle") - -渲染后: - -1 -``` - -如果原地址是绝对地址就是不会加入基地址: - -``` -![2](/1/2/3.jpg=100x200 "mytitle") -==> 2 - -![3](http://rainboy.com/1/2/3.jpg=100x200 "mytitle") -2 -``` - -height width是选的,但是两个必须同时写上 - -``` -![4](/1/2/3.jpg "mytitle") -==> 2 - -![5](/1/2/3.jpg=100x "mytitle") -==> 2 -``` diff --git a/base64.js b/base64.js deleted file mode 100644 index ec4e931..0000000 --- a/base64.js +++ /dev/null @@ -1,19 +0,0 @@ -var base_64 = require("base-64") -var utf8 = require("utf8") -var base64 = {} - -base64.encode = function(str){ - var bytes = utf8.encode(str); - return base_64.encode(bytes); -} - -base64.decode = function(encoded){ - var bytes = base_64.decode(encoded); - return utf8.decode(bytes); -} - -module.exports = base64 - -exports.init = function(){ - window.base64 = base64; -} diff --git a/clipbordCopy.js b/clipbordCopy.js deleted file mode 100644 index a526805..0000000 --- a/clipbordCopy.js +++ /dev/null @@ -1,58 +0,0 @@ -var base64 = require('./base64.js') - -function clipboardCopy (text) { - // A contains the text to copy - var span = document.createElement('span') - span.textContent = text - span.style.whiteSpace = 'pre' // Preserve consecutive spaces and newlines - - // An