Skip to content

Commit

Permalink
Merge pull request #100 from nnnnn319/dev
Browse files Browse the repository at this point in the history
markdown component
  • Loading branch information
IRONICBo authored Feb 7, 2024
2 parents 071c019 + c2d70b5 commit 68874cd
Show file tree
Hide file tree
Showing 14 changed files with 115,350 additions and 1,147 deletions.
112,251 changes: 112,251 additions & 0 deletions cmd/gopcomm/yap/component/GoplusMarkdown.js

Large diffs are not rendered by default.

2,139 changes: 2,139 additions & 0 deletions cmd/gopcomm/yap/component/GoplusMarkdown.umd.cjs

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions cmd/gopcomm/yap/component/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<html>

<head>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.8/plyr.css" >
</head>
<body>
<div id="app">
<!-- <markdown-editor></markdown-editor> -->
<markdown-viewer md="```gop ```"></markdown-viewer>
</div>
</body>
<script src="https://cdn.plyr.io/3.6.8/plyr.js"></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script data-widgets="code" src="https://goplus.org/widgets/loader.js"></script>

<script type="importmap">
{ "imports": {
"vue": "https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.41/vue.esm-browser.prod.js",
"vue-router": "https://cdnjs.cloudflare.com/ajax/libs/vue-router/4.1.5/vue-router.esm-browser.min.js"
} }
</script>


<script type="module">
import {MarkdownEditor, MarkdownViewer} from './GoplusMarkdown.js'; // vue组件与编辑组件
console.log(MarkdownEditor)
const { createApp } = Vue

createApp({
data() {
return {
message: 'Hello Vue!'
}
},
components: {
MarkdownEditor: MarkdownEditor,
MarkdownViewer: MarkdownViewer
}
}).mount('#app')


</script>

</html>
1 change: 1 addition & 0 deletions cmd/gopcomm/yap/component/style.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/lib/lib.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as MarkdownEditor } from "../src/components/MarkdownEditor.vue";
export { default as MarkdownViewer } from '../src/components/MarkdownViewer.vue'
55 changes: 10 additions & 45 deletions cmd/gopcomm/yap/markdown-vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
<script setup>
import Cherry from './components/Cherry.vue';
// import gop from './components/gop.vue'
// import { ref } from 'vue';
// let con = ref("hhhhh")
import MarkdownEditor from './components/MarkdownEditor.vue';
import MarkdownViewer from './components/MarkdownViewer.vue';
</script>

<!-- <script>
!function(){
var t,e={
code:[
"https://goplus.org/_next/static/widgets/code.f81abac15122c88e65d7.css",
"https://goplus.org/_next/static/widgets/code.85827e18ab6a0fa63bdc.js"
],
footer:[
"https://goplus.org/_next/static/widgets/footer.5f76b11115203767e7c3.css",
"https://goplus.org/_next/static/widgets/footer.64aca03204c8ae8ad97e.js"
],
header:[
"https://goplus.org/_next/static/widgets/header.5445867c6da0bcd5587b.css",
"https://goplus.org/_next/static/widgets/header.9ea108e482eb1e740a30.js"
]
};
// ((null===(t=document.currentScript)||void 0===t?void 0:'code')||"").split(",")
["code"]
.map((function(t){return t.trim()}))
.filter(Boolean)
.forEach((
function(t){
var s=e[t]||[];
function o(){
var t=s.find((function(t){return/\.js$/.test(t)})),
e=s.find((function(t){return/\.css$/.test(t)}));
if(null!=t){
var o=document.createElement("script");
o.src=t,null!=e&&o.setAttribute("data-style-url",e),document.body.appendChild(o)
}
}
"loading"!==document.readyState?o():window.addEventListener("DOMContentLoaded",o)
}
))
}();
</script> -->


<template>
<Cherry></Cherry>
<markdown-editor></markdown-editor>
<markdown-viewer md="#Hello"></markdown-viewer>
</template>

<!-- <gop :cont="con"></gop> -->

</template>
<script>
// console.log(MarkdownViewer.methods.convertMdToHtml("!video[video/mp4](https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4)"))
</script>

<style scoped>
Expand Down
Loading

0 comments on commit 68874cd

Please sign in to comment.