<template>
	<view style="width: 100%;">
		<view>
			<view class="toolbar">
				<!-- 加粗 -->
				<view class="iconfont icon-bold" @click="toolBarClick('bold')"></view>
				<!-- 斜体 -->
				<view class="iconfont icon-italic" @click="toolBarClick('italic')"></view>
				<!-- 标题 -->
				<view class="iconfont icon-xiahuaxian1" @click="toolBarClick('header')"></view>
				<!-- <view class="iconfont icon-underline" @click="toolBarClick('underline')"></view>
				<view class="iconfont icon-strike" @click="toolBarClick('strike')"></view>
				<view class="iconfont icon-sup" @click="toolBarClick('sup')"></view>
				<view class="iconfont icon-sub" @click="toolBarClick('sub')"></view>
				<view class="iconfont icon-alignleft" @click="toolBarClick('alignleft')"></view>
				<view class="iconfont icon-aligncenter" @click="toolBarClick('aligncenter')"></view>
				<view class="iconfont icon-alignright" @click="toolBarClick('alignright')"></view> -->
				<!-- 插入链接 -->
				<view class="iconfont icon-link" @click="toolBarClick('link')"></view>
				<!-- 插入图片 -->
				<view class="iconfont icon-image" @click="toolBarClick('imgage')"></view>
				<!-- 插入代码 -->
				<view class="iconfont icon-code" @click="toolBarClick('code')"></view>
				<!-- 插入引用 -->
				<view class="iconfont icon-blockquote" @click="toolBarClick('blockquote')"></view>
				<!-- 插入列表文本 -->
				<view class="iconfont icon-unorderedlist" @click="toolBarClick('unorderedlist')"></view>
				<!-- 插入列表文本 -->
				<view class="iconfont icon-orderedlist" @click="toolBarClick('orderedlist')"></view>
				<!-- 插入表格 -->
				<view class="iconfont icon-table" @click="toolBarClick('table')"></view>
				<!-- 清除 -->
				<view class="iconfont icon-qingkong" @click="toolBarClick('clear')"></view>
				<!-- 预览 -->
				<view class="iconfont icon-preview" @click="toolBarClick('look')"></view>
			</view>
			<view class="input-content" v-if="!showPreview">
				<textarea :style="{ height: height + 'rpx' }" maxlength="-1" v-model="textareaData" @blur="getCursor" :focus="autoFocus" :fixed="true"></textarea>
			</view>
			<scroll-view v-if="showPreview" class="u-p-30" scroll-y :style="[{ height: height + 'rpx', width: 'auto', border: '1px solid #eee' }]">
				<u-parse
					:html="textareaHtml"
					@imgtap="navigate"
					@linkpress="navigate"
					:tag-style="vuex_parse_style"
					:domain="vuex_config.upload ? vuex_config.upload.cdnurl : ''"
				></u-parse>
			</scroll-view>
		</view>
	</view>
</template>

<script>
import marked from '@/components/fa-markdown/marked/index.js';
export default {
	name: 'fa-markdown',
	data: function() {
		return {
			cursor: 0,
			textareaData: '',
			textareaHtml: '',
			showPreview: false,
			autoFocus: false
		};
	},
	props: {
		markdown: {
			type: String,
			default: ''
		},
		html: {
			type: String,
			default: ''
		},
		height: {
			type: Number,
			default() {
				return 500;
			}
		},
		//多个富文本的区分
		marKey:{
			type:[String,Number],
			default:''
		}
	},
	methods: {
		preview(src, e) {
			uni.previewImage({
				urls: src
			});
		},
		navigate(e) {
			console.log(e);
		},
		toolBarClick(type) {
			switch (type) {
				case 'bold':
					this.textareaData += '**粗体文字** ';
					break;
				case 'italic':
					this.textareaData += '*斜体* ';
					break;
				case 'header':
					uni.showActionSheet({
						itemList: ['标题1', '标题2', '标题3', '标题4', '标题5', '标题6'],
						success: res => {
							switch (res.tapIndex) {
								case 0:
									this.textareaData += '# 标题1\r';
									return;
								case 1:
									this.textareaData += '## 标题2\r';
									return;
								case 2:
									this.textareaData += '### 标题3\r';
									return;
								case 3:
									this.textareaData += '#### 标题4\r';
									return;
								case 4:
									this.textareaData += '##### 标题5\r';
									return;
								case 5:
									this.textareaData += '###### 标题6\r';
									return;
							}
						}
					});
					break;
				case 'underline':
					this.textareaData += '++下划线++ ';
					break;
				case 'strike':
					this.textareaData += '~~中划线~~ ';
					break;
				case 'sup':
					this.textareaData += '^上角标^ ';
					break;
				case 'sub':
					this.textareaData += '~下角标~ ';
					break;
				case 'alignleft':
					this.textareaData += '\n::: hljs-left\n\n左对齐\n\n:::\n';
					break;
				case 'aligncenter':
					this.textareaData += '\n::: hljs-center\n\n居中对齐\n\n:::\n';
					break;
				case 'alignright':
					this.textareaData += '\n::: hljs-right\n\n\n\n右对齐\n\n:::\n';
					break;
				case 'link':
					this.textareaData += '[在此输入网址描述](在此输入网址) ';
					break;
				case 'imgage':
					uni.chooseImage({
						count: 1,
						success: async chooseImageRes => {
							const tempFilePaths = chooseImageRes.tempFilePaths;
							try {
								let res = await this.$api.goUpload({filePath:tempFilePaths[0]});
								console.log(res);
								this.textareaData += '![](' + res.data.fullurl + ') ';
							} catch (e) {
								console.error(e);
								this.$u.toast('上传失败！');
								this.textareaData += '![](在此输入图片地址) ';
							}
						}
					});
					break;
				case 'code':
					this.textareaData += '\n``` 代码块 \n\n```\n';
					break;
				case 'blockquote':
					this.textareaData += '> 这里输入引用文本这里输入引用文本\n';
					break;
				case 'unorderedlist':
					this.textareaData += '- 这里是列表文本\n';
					break;
				case 'orderedlist':
					this.textareaData += '1. 这里是列表文本\n';
					break;
				case 'table':
					this.textareaData += '\n|列1|列2|列3|\n|-|-|-|\n|单元格1|单元格2|单元格3|\n';
					break;
				case 'clear':
					uni.showModal({
						title: '提示',
						content: '确定清空?',
						success: res => {
							if (res.confirm) {
								this.textareaData = '';
							}
						}
					});
					break;
				case 'look':
					this.showPreview = !this.showPreview;
					break;
				default:
					this.showPreview = false;
			}
		},
		getCursor(e) {
			//安卓失去焦点获取不到cursor位置,暂不使用
			//this.cursor = e.detail.cursor;
		},
		getAutoFocus() {
			this.autoFocus = true;
		},
		clearData() {
			this.textareaData = '';
		},
		getData() {
			return {
				key:this.marKey,
				textareaData: newValue,
				textareaHtml: this.textareaHtml
			};
		},
		setData(param) {
			this.textareaData = param;
		}
	},
	watch: {
		textareaData: function(newValue, oldValue) {
			this.textareaHtml = marked(newValue);
			this.$emit('getResult', {
				key:this.marKey,
				textareaData: newValue,
				textareaHtml: this.textareaHtml
			});
		},
		markdown: {
			handler: function(newValue, oldValue) {
				this.textareaData = newValue;
			},
			immediate: true
		},
		html: {
			handler: function(newValue, oldValue) {
				this.textareaHtml = newValue;
			},
			immediate: true
		}
	}
};
</script>

<style>
@font-face {
	font-family: 'iconfont';
	src: url(data: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nnsQGc4xsK/98l7oQVjvEoXMERMuEq9RfhGvlduI4WPoUb1H+Em7hVA+EWLtQbHVTthLub0m3LCmcYCFdwiifhKvWVcI38KlzHFT6EG9S/hJsY41e4hWtlqQzhYTBBYJxBY4oN4wIxHCySMgbWoTn0ZhLMTE83ehE7mzgbKO9XYpcDHmg554Ap7T23Zr5KJ/5gy4HUmG4eBUu2KY0uInQoG18snNXdqHOw/Z7ttrTYv2uBNcfsUQ1s1Pw92zPSSGwMr5CSNfIyt6QSU49oa6zxu2cp1vNeCIlOvMv0iMeaNHU6925p4sDi5/KMHH20uZI996gcPmNZCHm/3U7EIIpdhj+T2HEZAAAAeNptj9lu2zAQRX0tSrakpE33fU33PV2B/g1FjSRWFMmMSMf+g352afelDx3gDs4QQ+DMYrn4W9Xi//UzBYsllsggkKPACmuUqFDjCMe4hMs4wRVcxTVcxw3cxC3cxh3cxT3cxwM8xKPFbzzGEzzFKZ7hOV7gJV7hNd7gLd7hPT7gIz7hDJ/xBV/xDd/xo5ZG91aRDcRHB/4V56C7XXkYDHWhOhDrfgiFtGpwXDXGqfE8ukCicaYVapBcK0OSO8eTDEK5lkrlbKf7yJRGvyuUY0ucqRjWrQwU9EQr2nrj0kKnbVt10ZhZMZEVAxm/HLhIz0mt0CE5KGG0HTMTWNhm9pmli6Uba8ctMbVGz2HlYtjvl1721DDJMfdyDlQf+j7bsPJMG00XuWdtg0g/XcbBiFluqJgnbWhXz56UlmZ/VZXYJCI1FnNgPVI2xybF50E2htaBJm/SOWVMqpwMSSRyRbR72+No//HLN7olJybJY66n5Lg+17Yfne3rrZZDlKnbsz/BTZqeAAAAAAAB//8AAgABAAAADAAAABYAAAACAAEAAwA5AAEABAAAAAIAAAAAeNpjYGBgZACCq0vUOUD09dU2PjAaADzdBb4AAA==)
			format('woff');
	font-weight: normal;
	font-style: normal;
}

.iconfont {
	font-family: 'iconfont' !important;
	font-size: 16px;
	font-style: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.icon-aligncenter:before {
	content: '\e600';
}

.icon-alignjustify:before {
	content: '\e601';
}

.icon-alignleft:before {
	content: '\e602';
}

.icon-aligncenter1:before {
	content: '\e603';
}

.icon-alignjustify1:before {
	content: '\e604';
}

.icon-alignleft1:before {
	content: '\e605';
}

.icon-alignright:before {
	content: '\e606';
}

.icon-anchor:before {
	content: '\e607';
}

.icon-blockquote:before {
	content: '\e608';
}

.icon-bold:before {
	content: '\e609';
}

.icon-char:before {
	content: '\e60a';
}

.icon-clearformat:before {
	content: '\e60b';
}

.icon-code:before {
	content: '\e60c';
}

.icon-configure:before {
	content: '\e60d';
}

.icon-copy:before {
	content: '\e60e';
}

.icon-corner:before {
	content: '\e60f';
}

.icon-cut:before {
	content: '\e610';
}

.icon-datetime:before {
	content: '\e611';
}

.icon-explore:before {
	content: '\e612';
}

.icon-find:before {
	content: '\e613';
}

.icon-fullscreen:before {
	content: '\e614';
}

.icon-help:before {
	content: '\e615';
}

.icon-hr:before {
	content: '\e616';
}

.icon-indent:before {
	content: '\e618';
}

.icon-italic:before {
	content: '\e619';
}

.icon-link:before {
	content: '\e61a';
}

.icon-ltr:before {
	content: '\e61b';
}

.icon-nbsp:before {
	content: '\e61c';
}

.icon-new:before {
	content: '\e61d';
}

.icon-ok:before {
	content: '\e61e';
}

.icon-orderedlist:before {
	content: '\e61f';
}

.icon-outdent:before {
	content: '\e620';
}

.icon-pagebreak:before {
	content: '\e621';
}

.icon-paragraph:before {
	content: '\e622';
}

.icon-paste:before {
	content: '\e623';
}

.icon-pasteastext:before {
	content: '\e624';
}

.icon-preview:before {
	content: '\e625';
}

.icon-print:before {
	content: '\e626';
}

.icon-redo:before {
	content: '\e627';
}

.icon-rtl:before {
	content: '\e628';
}

.icon-save:before {
	content: '\e629';
}

.icon-smiley:before {
	content: '\e62a';
}

.icon-specialchar:before {
	content: '\e62b';
}

.icon-spellcheck:before {
	content: '\e62c';
}

.icon-strike:before {
	content: '\e62d';
}

.icon-sub:before {
	content: '\e62e';
}

.icon-sup:before {
	content: '\e62f';
}

.icon-table:before {
	content: '\e630';
}

.icon-template:before {
	content: '\e631';
}

.icon-underline:before {
	content: '\e632';
}

.icon-undo:before {
	content: '\e633';
}

.icon-unlink:before {
	content: '\e634';
}

.icon-unorderedlist:before {
	content: '\e635';
}

.icon-video:before {
	content: '\e636';
}

.icon-mark:before {
	content: '\e63a';
}

.icon-image:before {
	content: '\e63e';
}

.icon-xiahuaxian1:before {
	content: '\e7d1';
}

.icon-qingkong:before {
	content: '\e6a3';
}


.input-content {
	width: 100%;
}

.input-content textarea {
	padding: 5%;
	font-size: 30rpx;
	line-height: 1.5;
	width: 90%;
	border: 1px solid #eee;
}

.preview {
	border-top: 1px solid #e0e0e0;
	width: 100%;
}

.toolbar {
	width: 100%;
	border: none;
}

.toolbar .iconfont {
	display: inline-block;
	cursor: pointer;
	height: 61.6rpx;
	width: 61.6rpx;
	margin: 13rpx 0;
	font-size: 33rpx;
	color: #757575;
	border-radius: 11px;
	text-align: center;
	background: none;
	border: none;
	outline: none;
	line-height: 2.2;
	vertical-align: middle;
}

.input-content {
	min-height: ;
}
</style>
