晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
| DIR:/home/salvufkx/homedir/www/wp-content/plugins/shortcodes-ultimate/assets/js/ |
| Current File : /home/salvufkx/homedir/www/wp-content/plugins/shortcodes-ultimate/assets/js/tinymce.js |
! function () {
tinymce.create('tinymce.plugins.shortcodesultimate', {
init: function (e) {
var t = this,
n = 'su';
// e.onKeyPress.add(function (e, o) {
e.onBeforeSetContent.add(function (e, o) {
// console.log(e);
o.content = t["_shortcodes2html"](o.content);
});
e.onPostProcess.add(function (e, o) {
o.set && (o.content = t["_shortcodes2html"](o.content));
o.get && (o.content = t["_html2shortcodes"](o.content));
});
},
getInfo: function () {
return {
longname: "BBCode Plugin",
author: "Moxiecode Systems AB",
authorurl: "http://www.tinymce.com",
infourl: "http://www.tinymce.com/wiki.php/Plugin:bbcode"
}
},
_html2shortcodes: function (content) {
// Prepare data
var shortcodes = ['row', 'column'],
prefix = '';
// Trim content
content = tinymce.trim(content);
content = content.replace(/<div.*?class=\"su-row (.*?)\".*?>(.*?)<\/div>/gi, '[row class="$1"]$2[/column]');
content = content.replace(/<div.*?class=\"su-column su-column-size-(.*?) (.*?)\".*?>(.*?)<\/div>/gi, '[column size="$1" class="$2"]$3[/column]');
return content;
// function t(t, n) {
// e = e.replace(t, n);
// }
// return e = tinymce.trim(e),
// t(),
// e;
// t(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]"),
// t(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]"),
// t(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]"),
// t(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]"),
// t(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]"),
// t(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]"),
// t(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]"),
// t(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]"),
// t(/<font>(.*?)<\/font>/gi, "$1"),
// t(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]"),
// t(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]"),
// t(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]"),
// t(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]"),
// t(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]"),
// t(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]"),
// t(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]"),
// t(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]"),
// t(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]"),
// t(/<\/(strong|b)>/gi, "[/b]"),
// t(/<(strong|b)>/gi, "[b]"),
// t(/<\/(em|i)>/gi, "[/i]"),
// t(/<(em|i)>/gi, "[i]"),
// t(/<\/u>/gi, "[/u]"),
// t(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]"),
// t(/<u>/gi, "[u]"),
// t(/<blockquote[^>]*>/gi, "[quote]"),
// t(/<\/blockquote>/gi, "[/quote]"),
// t(/<br \/>/gi, "\n"),
// t(/<br\/>/gi, "\n"),
// t(/<br>/gi, "\n"),
// t(/<p>/gi, ""),
// t(/<\/p>/gi, "\n"),
// t(/ |\u00a0/gi, " "),
// t(/"/gi, '"'),
// t(/</gi, "<"),
// t(/>/gi, ">"),
// t(/&/gi, "&"),
},
_shortcodes2html: function (content) {
// Prepare data
var shortcodes = ['row', 'column'],
prefix = '';
// Trim content
content = tinymce.trim(content);
// Loop shortcodes
for (var i = shortcodes.length - 1; i >= 0; i--) {
content = wp.shortcode.replace(prefix + shortcodes[i], content, this._shortcode2html);
};
return content;
// return e = tinymce.trim(e),
// t(/\[column.*?size="(.*?)".*?class="(.*?)".*?\](.*?)\[\/column\]/gi, '<div class="su-column su-column-size-$1 $2">$3</div>'),
// t(/\n/gi, "<br />"),
// t(/\[b\]/gi, "<strong>"),
// t(/\[\/b\]/gi, "</strong>"),
// t(/\[i\]/gi, "<em>"),
// t(/\[\/i\]/gi, "</em>"),
// t(/\[u\]/gi, "<u>"),
// t(/\[\/u\]/gi, "</u>"),
// t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '<a href="$1">$2</a>'),
// t(/\[url\](.*?)\[\/url\]/gi, '<a href="$1">$1</a>'),
// t(/\[img\](.*?)\[\/img\]/gi, '<img src="$1" />'),
// t(/\[color=(.*?)\](.*?)\[\/color\]/gi, '<font color="$1">$2</font>'),
// t(/\[code\](.*?)\[\/code\]/gi, '<span class="codeStyle">$1</span> '),
// t(/\[quote.*?\](.*?)\[\/quote\]/gi, '<span class="quoteStyle">$1</span> '),
// e
},
_shortcode2html: function (s) {
// Prepare data
var prefix = '';
// Remove prefix from shortcode tag name
s.tag = s.tag.replace(prefix, '');
// Row
if (s.tag === 'row') {
var cssclass = (typeof s.attrs.named.class !== 'undefined') ? ' ' + s.attrs.named.class : '';
return '<div class="su-row' + cssclass + '">' + s.content + '</div>';
}
// Columns
else if (s.tag === 'column') {
var size = (typeof s.attrs.named.size !== 'undefined') ? s.attrs.named.size.replace('/', '-') : '1-1',
cssclass = (typeof s.attrs.named.class !== 'undefined') ? ' ' + s.attrs.named.class : '';
return '<div class="su-column su-column-size-' + size + cssclass + '">' + s.content + '</div>';
}
}
}),
tinymce.PluginManager.add('shortcodesultimate', tinymce.plugins.shortcodesultimate);
}(); |