0
私の理解として、Markitupは解析するためにサーバー側が必要です。 クライアントの純粋な Markitupはありますか?純粋なクライアント側のMarkitup
私の理解として、Markitupは解析するためにサーバー側が必要です。 クライアントの純粋な Markitupはありますか?純粋なクライアント側のMarkitup
javascriptを使用して解析を実装すると、サーバー側のロジックが不要になります。
あなたがMarkItUpをダウンロードするときの例では、だから、あなただけ例えばwriteInPreviewであなたの解析ロジックを追加することができ、プレビュー
$.ajax({
url:options.previewTemplatePath,
dataType: 'text',
global: false,
success: function(data) {
writeInPreview(localize(data, 1).replace(/<!-- content -->/g, $$.val()));
}
});
function writeInPreview(data) {
if (options.previewInElement) {
$(options.previewInElement).html(data);
} else if (previewWindow && previewWindow.document) {
try {
sp = previewWindow.document.documentElement.scrollTop
} catch(e) {
sp = 0;
}
previewWindow.document.open();
previewWindow.document.write(data);
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop = sp;
}
}
を生成するためにJavaScriptを使用しています。