Permalink
Browse files

Markdown preview.

  • Loading branch information...
1 parent 2c53536 commit 405edfd8ffd5ec8f6697d2dc7ece7d7dabf60334 @wangbus wangbus committed Mar 2, 2012
Oops, something went wrong.
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "CFA927F115009C2D00638EC0"
+ BuildableName = "HiCapacityPreview.app"
+ BlueprintName = "HiCapacityPreview"
+ ReferencedContainer = "container:HiCapacityPreview.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "CFA9281215009C2D00638EC0"
+ BuildableName = "HiCapacityPreviewTests.octest"
+ BlueprintName = "HiCapacityPreviewTests"
+ ReferencedContainer = "container:HiCapacityPreview.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "CFA927F115009C2D00638EC0"
+ BuildableName = "HiCapacityPreview.app"
+ BlueprintName = "HiCapacityPreview"
+ ReferencedContainer = "container:HiCapacityPreview.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "CFA927F115009C2D00638EC0"
+ BuildableName = "HiCapacityPreview.app"
+ BlueprintName = "HiCapacityPreview"
+ ReferencedContainer = "container:HiCapacityPreview.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "CFA927F115009C2D00638EC0"
+ BuildableName = "HiCapacityPreview.app"
+ BlueprintName = "HiCapacityPreview"
+ ReferencedContainer = "container:HiCapacityPreview.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>HiCapacityPreview.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>CFA927F115009C2D00638EC0</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>CFA9281215009C2D00638EC0</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
Oops, something went wrong.
@@ -0,0 +1,12 @@
+$(function() {
+ var converter = new Showdown.converter();
+ $("#user_input").keyup(function(){
+ var txt = $("#user_input").val();
+ var html = converter.makeHtml(txt);
+ $("#result").html(html)
+ $("#html_result").val(html.replace(/>/g, ">\n").replace(/</g, "\n<").replace(/\n{2,}/g, "\n\n"));
+ });
+
+ $("#result").html(html);
+ $("#html_result").val(html.replace(/>/g, ">\n").replace(/</g, "\n<").replace(/\n{2,}/g, "\n\n"));
+});
File renamed without changes.
View
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Live Preview</title>
+
+ <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
+ <script type="text/javascript" src="js/showdown.js"></script>
+ <script type="text/javascript" src="js/preview.js"></script>
+ </head>
+
+ <body>
+
+ <div id="wrapper">
+ <div id="content" class="site">
+ <div class="content">
+
+<h2>User input</h2>
+
+<p><textarea id="user_input"></textarea></p>
+
+<h2>Live preview</h2>
+
+<div id="result"></div>
+
+
+<h3>HTML</h3>
+
+<p><textarea id="html_result"></textarea></p>
+
+
+ </div><!-- /.content -->
+ </body>
+</html>
+

0 comments on commit 405edfd

Please sign in to comment.