Git Product home page Git Product logo

wmd's Introduction

WMD: The Wysiwym Markdown Editor

Introduction

WMD is a JavaScript based code editor for the Markdown formatting language. It includes a Markdown interpreter โ€“ Showdown โ€“ for live preview and output of the Markdown generated HTML.

This is a fork of WMD for ChiperSoft Systems & NFY Interactive designed for use in CMS engines. It was forked from the Open Library fork of WMD, which was in turn forked from the Stackoverflow fork.

Major Changes from Open Library Revision

  • Extended showdown to support a series of Markdown extensions:
    • Link urls that start with ! are opened in a new window
    • Text wrapped with double carets is made superscript (ex: ^^this text is superscripted^^)
    • Text wrapped with double commas is made subscript (ex: ,,this text is subscripted,,)
    • Text wrapped with double tildes is made strikethrough (ex: ~~this text is struck~~)
    • (c), (r), (tm), -- and ... are converted into their respective html entities.
    • Lines prefixed with "->" are right aligned. Lines also postfixed with "<-" are center aligned.
  • Several ascii characters that may produce encoding issues (such as curled quotes) are converted into entities
  • Removed top level frame pollution, forcing WMD to run only in its own document.
  • Removed the automatic conversion from Markdown to HTML when the form is submitted.
  • Removed the automatic addition of http:// to image urls, preventing the entry of relative addresses.
  • Numerous bug fixes to both WMD and Showdown

How to use

<html>
    <head>
        <title>WMD Example</title>
    
        <link rel="stylesheet" type="text/css" href="wmd.css"/>
        <script type="text/javascript" src="wmd.js"></script>
        <script type="text/javascript" src="showdown.js"></script>
    </head>
    <body>
        <h1>WMD Example</h1>

        <div>
            <div id="notes-button-bar"></div>
            <textarea id="notes" name="copy"></textarea>
            <div id="notes-preview"></div>
			<input type="text" name="copy_html" value="" id="copy_html">
        </div>

        <script type="text/javascript">
            setup_wmd({
                input: "notes",
                button_bar: "notes-button-bar",
                preview: "notes-preview",
				output: "copy_html"
            });
        </script>
    </body>
</html>

License

WMD Editor is licensed under MIT License.

wmd's People

Contributors

derobins avatar twipped avatar anandology avatar cky avatar

Watchers

James Cloos avatar Matthew David Elgert avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.