~~ Title: MD cheatsheet and SimpleMDE JS based Markdown Editor Published: 2018-03-20 Author: phporacle Template: blog Tag: Help, Markdown sintax, SimpleMDE ~~ >MD to HTML converters on inet : 1. **Notepad++ plugin https://github.com/nea/MarkdownViewerPlusPlus** then in npp Settings -> Import -> Import plugin(s) 2. **https://www.tutorialspoint.com/online_markdown_editor.php or https://markdowntohtml.com/** 3. or (many converters) https://www.browserling.com/tools/markdown-to-html 4. or files convert to many formats : https://products.aspose.app/pdf/conversion/md-to-html 5. Links not working : http://demo.showdownjs.com/ (no HTML source) NOT WORKING : https://daringfireball.net/projects/markdown/dingus or https://pandoc.org/try/ >https://www.w3schools.com/html/html_symbols.asp >https://www.degraeve.com/reference/specialcharacters.php #### [About SimpleMDE](#SimpleMDE) https://github.com/sparksuite/simplemde-markdown-editor # 1. Content 1. **non-breaking space** | System | Key combination | |------------|-------------------------------------------------------------| | Windows |
Alt + 255 or ANDnbsp;
| | | or Alt + 0160 | | macOS | ⌥ Opt+Space | | Linux | Compose+Space+Space | | In many commercial software | Ctrl + Space | 1. `Text Underlined with - or = is header` H1, H2... (hash, 2xhash,... at line beginning), H2 with equal signs in next line is H1, H2 with minus signs in next line is H3. 1. Ignoring Markdown formatting: by using \ before the Markdown character. Eg Let's rename \*our-new-project\* to \*our-old-project\*. Same without \ : Let's rename *our-new-project* to *our-old-project*. 1. [Emphasis (bold...)](#Emphasis) 1. [Lists](#Lists) 1. [Links](#Links) [inline-style: https://google.hr link](https://google.hr) `[inline-style: https://google.hr link](https://google.hr)` `Anchors new : jumps to anchor [Lists](){:name='Lists'} - not working for me` `old [Emphasis](#Emphasis) jumps to
2. Emphasis` 1. [Images](#Images) 1. [Code](#Code) and Syntax Highlighting: `Code inline : 1 backtick (altgr+7) around string or 4 spaces idented - in this list does not work` **Code block**: fenced by lines with three back-ticks eg three altgr+7php ...SOME CODE... three altgr+7, or four blanks idented (at line beginning) - in this list does not work or `
some_txt
` ```php blah='; print_r('blah, blah'); echo ''; ``` Code blocks are part of the Markdown spec, but **syntax highlighting isn't**. Many renderers like **Github's and Markdown Here** support syntax highlighting. Which languages are supported and **how those language names should be written** vary from renderer to renderer. **Markdown Here** supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write language names, see the **highlight.js demo page** http://softwaremaniacs.org/media/soft/highlight/test.html . 1. [Tables](#Tables) 1. [Blockquotes](#blockquotes) 1. Inline HTML: raw HTML mostly works 1. `HR (Horizontal Rule): Three or more hypens --- or 3 asterisks *** or 3 underscores ___` 1. Line Breaks: two blanks at line end or ENTER KEY twice 1. `Blank line : \HTML space character ANDnbsp; followed by 2 spaces or
or ANDNewLine;` 1. [Videos](#Videos) (Youtube) [more] #
2. Emphasis **Italics** (Emphasis): *asterisks* or _underscores_ `*asterisks*` or `_underscores_` (backticks = print as is) **Bold** (Strong emphasis), with **asterisks** or __underscores__: `**asterisks**` or `__underscores__` **Combined** emphasis with **asterisks and _underscores_**: `**asterisks and _underscores_**` **Strikethrough** uses two tildes. ~~Scratch this.~~: `~~Scratch this.~~` #
3. Lists 1. First ordered list item, has 1.BLANK at begginning - others can have same 1. 1. Another item - actual numbers don't matter, just that it's a number - **1 (or 2) LEADING SPACES = sub-list** - Unordered list use **asterisk BLANK or minuses or pluses** instead 1.BLANK 1. Third item * 2 LEADING SPACES = sub-list * 2 LEADING SPACES 1. And fourth item To have a line break within same paragraph, use 2 TRAILING SPACES. No effect: 3 LEADING SPACES - Note that this line is separate, but within same paragraph.(2 TRAILING SPACES IN PREVIOUS LINE) This is contrary to the typical GFM line break behaviour, where trailing spaces are not required. 4 LEADING SPACES renders to HTML code (pre) block tag. Code inline: backticks (`altgr+7`) around string ## Task lists To create a task list, preface list items with a regular space character followed by [ ]. To mark a task as complete, use [x]. - [x] Finish my changes - [ ] Push my commits to GitHub - [ ] Open a pull request #
4. Links There are two ways to create links. [I'm an **inline-style** link](https://www.google.com) [inline-style link with title](https://www.google.com "Google's Homepage") [I'm a **reference-style link** ee LINK IS AT SCRIPT END - mozila] [Arbitrary case-insensitive reference text] [You can use **numbers for reference-style link** definitions - slashdot][1] Or leave it empty and use the [link text] - reddedit. [I'm a **relative reference** to a repository file](../blob/master/LICENSE) URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com and sometimes example.com (but not eg on Github). Some text to show that the reference links can follow later. **Here are reference-style links AT SCRIPT END** [arbitrary case-insensitive reference text]: https://www.mozilla.org [1]: http://slashdot.org [link text]: http://www.reddit.com #
5. Images ## Using emoji You can add emoji to your writing by typing :EMOJICODE: @octocat :+1: This PR looks great - it's ready to merge! :shipit: Markdown logo (hover to see title text): Inline-style: ``  Reference-style: `![alt text][logo]` [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Mkd Logo Title Text 2" #
6. Code and Syntax Highlighting Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and Markdown Here -- support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. Markdown Here supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see highlight.js demo page http://softwaremaniacs.org/media/soft/highlight/test.html. Inline `code` has `back-ticks around` it (AltGr+7). Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting. ```php echo MarkdownExtra::defaultTransform( file_get_contents("MarkdownCheatsheet.txt") ); ``` ```javascript var s = "JavaScript syntax highlighting"; alert(s); ``` ```python s = "Python syntax highlighting" print s ``` ``` No language indicated, so no syntax highlighting. But let's throw in b (bold). ``` var s = "JavaScript syntax highlighting"; alert(s); s = "Python syntax highlighting" print s No language indicated, so no syntax highlighting in Markdown Here (varies on Github). But let's throw in a . #
7. Tables Tables aren't part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application. Colons can be used to align columns. | Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | $1600 | | col 2 is | centered | $12 | | zebra stripes | are neat | $1 | There must be AT LEAST 3 DASHES SEPARATING EACH HEADER CELL. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. Markdown | Less | Pretty --- | --- | --- *Still* | `renders` | **nicely** 1 | 2 | 3
# 8. Blockquotes > Blockquotes are very handy in email to emulate reply text. > This line is part of the same quote. Quote break. > This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. > > paragraph 2222 aaaaaaaa gggggggg #
12. Videos (Youtube) Videos can't be added directly, but you can add an image with a link to the video like this: `
`
Or, in pure Markdown, but LOSING IMAGE SIZING AND BORDER: `[](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)` [](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE) Link to YOUTUBE_VIDEO_ID : "v=AYNtH7JMlAQ" for : **SSL/TLS Deployment Best Practices - Ivan Ristić** :
`[](http://www.youtube.com/watch?v=AYNtH7JMlAQ)` [](http://www.youtube.com/watch?v=AYNtH7JMlAQ) **Tom Odell - Another Love (Zwette Edit)** : [](https://www.youtube.com/watch?v=4ZHwu0uut3k) **Passenger - Let Her Go (Kygo Remix)** : [](https://www.youtube.com/watch?v=FpQY90M-hww) # Play here Let Her Go
##
SimpleMDE JS based Markdown Editor SimpleMDE is simple, embeddable, and beautiful and my test works ok. I also have portable WriteMonkey on my Windows10 64 bit. Keyboard shortcuts SimpleMDE comes with an array of predefined keyboard shortcuts, but they can be altered with a configuration option. The list of default ones is as follows: Shortcut Action Cmd-' "toggleBlockquote" Cmd-B "toggleBold" Cmd-E "cleanBlock" Cmd-H "toggleHeadingSmaller" Cmd-I "toggleItalic" Cmd-K "drawLink" Cmd-L "toggleUnorderedList" Cmd-P "togglePreview" Cmd-Alt-C "toggleCodeBlock" Cmd-Alt-I "drawImage" Cmd-Alt-L "toggleOrderedList" Shift-Cmd-H "toggleHeadingBigger" F9 "toggleSideBySide" F11 "toggleFullScreen" [View on GitHub](https://github.com/sparksuite/simplemde-markdown-editor) [Download .zip](https://github.com/sparksuite/simplemde-markdown-editor/zipball/master) [Download .tar.gz](https://github.com/sparksuite/simplemde-markdown-editor/tarball/master) ### Download https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css 11 kB (Jan.2018.) https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js 263 kB (Jan.2018.) ### Example editing markdown : # # ```php NrDBqueries = 0; msg( 'MAIN APP CONTROLLER beginn: Create URL array & load controller and it`s method(urlqry_ arr)', ['','$_POST=',$_POST], __FILE__,__LINE__,__METHOD__); $ctr = MODULE_DEFAULT_CTR ; $ctr_obj = new $ctr ; $akc = MODULE_DEFAULT_AKC; //read_all.php or 'index'=read_....php // 1. Create U R L array $req_uri = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL); //extract '/fwphp/glomodul/user_post_fmb/'= module below site, rest is url query : $urlqry_str = ltrim(str_replace( '/'.PATHMODULEBELOWSITE,'', $req_uri), QS) ; $urlqry_arr = explode('/', $urlqry_str); $urlqry_arr['urlqry_str'] = $urlqry_str ; $urlqry_arr['NrDBqueries'] = $this->NrDBqueries ; msg( 'MAIN APP CONTROLLER before load c t r: ' , ['' , '$urlqry_str=', $urlqry_str , '$urlqry_arr=', $urlqry_arr ], __FILE__,__LINE__,__METHOD__); // 2. load c t r eg new _Ctr_User; if(isset($urlqry_arr[0]) and $urlqry_arr[0]) { //$ctr = $urlqry_arr[0] ; $ctr = '_Ctr' . ucfirst($urlqry_arr[0]) ; //ucfirst, ucwords //unset($urlqry_arr[0]); // see below array_ values $ctr_obj = new $ctr ; if(isset($urlqry_arr[1]) and $urlqry_arr[1]) { $akc = $urlqry_arr[1] ; //unset($urlqry_arr[1]); // see below array_ values if(!method_exists($ctr, $akc)) { die( '
'. __METHOD__ . ' SAYS: "' . $akc.'" action method does not exist in class '.$ctr.'
');} /*if(method_exists($ctr, $akc)) { if ($urlqry_arr) { $params = array_values($urlqry_arr) ; $params['urlqry_str'] = $urlqry_str ; $params['NrDBqueries'] = $this->NrDBqueries ; } } */ } //e n d c t r`s m e t h o d is in u r l } //e n d c t r is in u r l //msg( 'MAIN APP CONTROLLER before call action: ' // .'$ctr=' . $ctr . ', $akc=' . $akc // , ['' // ,'$urlqry_ arr=',$urlqry_arr //], __FILE__,__LINE__,__METHOD__); $ctr_obj->$akc($urlqry_arr); //or echo it } //e n d _ _ c o n s t r u c t } ```