-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f44a68f
commit ce3cbe2
Showing
9 changed files
with
3,388 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
composer.lock | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# markdown-on-save | ||
# Markdown On Save | ||
|
||
|
||
### Credits | ||
|
||
This plugin is a fork of [Markdown on Save](https://wordpress.org/plugins/markdown-on-save/) by Mark Jaquith. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
do ($ = jQuery) -> | ||
app = window.markdownOnSaveApp = | ||
on: -> | ||
$('body').addClass 'cws-markdown' | ||
@html.click() | ||
@checkbox.attr 'checked', yes | ||
@buttonOn.show() | ||
a.hide() for a in [ @buttonOff, @html, @visual, @htmlButtons ] | ||
off: -> | ||
$('body').removeClass 'cws-markdown' | ||
@checkbox.attr 'checked', no | ||
@buttonOn.hide() | ||
a.show() for a in [ @buttonOff, @html, @visual, @htmlButtons ] | ||
delay: (ms, f) -> setTimeout f, ms | ||
start: -> | ||
context = $ '#cws-markdown' | ||
context.detach().insertBefore('#submitdiv h3 span').show() | ||
@buttonOn = $ 'img.markdown-on', context | ||
@buttonOff = $ 'img.markdown-off', context | ||
@checkbox = $ '#cws_using_markdown' | ||
@html = $ '#content-html' | ||
@visual = $ '#content-tmce' | ||
@htmlButtonsString = ('#qt_content_' + a for a in [ | ||
'strong' | ||
'em' | ||
'link' | ||
'block' | ||
'del' | ||
'ins' | ||
'img' | ||
'ul' | ||
'ol' | ||
'li' | ||
'code' | ||
'close' | ||
]).join ', ' | ||
@htmlButtons = $ @htmlButtonsString | ||
@events() | ||
@setFromCheckbox() | ||
setFromCheckbox: -> | ||
if app.checkbox.is ':checked' then app.on() else app.off() | ||
events: -> | ||
$([@buttonOn, @buttonOff]).each -> $(@).click (e) -> | ||
e.stopPropagation() # Keep metabox from toggling | ||
app.checkbox.click() | ||
@checkbox.change @setFromCheckbox | ||
# Kind of hacky, but this allows for Quicktags to be added to the DOM first | ||
$ -> app.delay 0, -> app.start() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "deliciousbrains/markdown-on-save", | ||
"description": "Allows you to compose content in Markdown on a per-item basis.", | ||
"license": "GPL-3.0+", | ||
"authors": [ | ||
{ | ||
"name": "Delicious Brains", | ||
"email": "[email protected]", | ||
"homepage": "https://deliciousbrains.com/" | ||
} | ||
], | ||
"type": "wordpress-plugin", | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Oops, something went wrong.