-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creation of Medium.Toolbar & Medium.Drag and option to turn Medium.Dr…
…ag on. Cleanup of codebase, combination of html assistant into utilities, and bring some utilities into Medium directly.
- Loading branch information
robertleeplummerjr
authored and
robertleeplummerjr
committed
Dec 15, 2014
1 parent
f0a652c
commit 9144a17
Showing
7 changed files
with
883 additions
and
483 deletions.
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
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
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
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,52 @@ | ||
var article5 = document.getElementById('article5'), | ||
article5Medium = new Medium({ | ||
element: article5, | ||
mode: Medium.richMode, | ||
placeholder: 'Your Article 5', | ||
attributes: null, | ||
tags: null, | ||
pasteAsText: false, | ||
drag: true | ||
}); | ||
|
||
article5.highlight = function() { | ||
if (document.activeElement !== article4) { | ||
article5Medium.select(); | ||
} | ||
}; | ||
|
||
document.getElementById('rich5-bold').onmousedown = function() { | ||
article5.highlight(); | ||
article5Medium.invokeElement('b', { | ||
title: "I'm bold!", | ||
style: "color: #66d9ef" | ||
}); | ||
return false; | ||
}; | ||
|
||
document.getElementById('rich5-underline').onmousedown = function() { | ||
article5.highlight(); | ||
article5Medium.invokeElement('u', { | ||
title: "I'm underlined!", | ||
style: "color: #a6e22e" | ||
}); | ||
return false; | ||
}; | ||
|
||
document.getElementById('rich5-italic').onmousedown = function() { | ||
article5.highlight(); | ||
article5Medium.invokeElement('i', { | ||
title: "I'm italics!", | ||
style: "color: #f92672" | ||
}); | ||
return false; | ||
}; | ||
|
||
document.getElementById('rich5-strike').onmousedown = function() { | ||
article5.highlight(); | ||
article5Medium.invokeElement('strike', { | ||
title: "I've been struck!", | ||
style: "color: #e6db74" | ||
}); | ||
return false; | ||
}; |
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
Oops, something went wrong.