Commit 2882b7d0 authored by RawKStar77's avatar RawKStar77

Fix bugs by getting rid of a bad idea. Tighten up styles.

parent 1e1a1dfd
# This directive controls both the rendering and display of markdown in annotations, as well as # This directive controls both the rendering and display of markdown in annotations, as well as
# the markdown editor interface. # the markdown editor interface.
markdown = ['$filter', '$timeout', ($filter, $timeout) -> markdown = ['$filter', '$timeout', ($filter, $timeout) ->
...@@ -11,14 +11,11 @@ markdown = ['$filter', '$timeout', ($filter, $timeout) -> ...@@ -11,14 +11,11 @@ markdown = ['$filter', '$timeout', ($filter, $timeout) ->
scope.returnSelection = -> scope.returnSelection = ->
# Maybe get selections from other parts of the text? Such as the quote or a reply? # Maybe get selections from other parts of the text? Such as the quote or a reply?
ourIframeSelection = window.getSelection().toString() ourIframeSelection = window.getSelection().toString()
parentDocumentSelection = parent.window.getSelection().toString()
if input[0].selectionStart != undefined if input[0].selectionStart != undefined
startPos = input[0].selectionStart startPos = input[0].selectionStart
endPos = input[0].selectionEnd endPos = input[0].selectionEnd
if ourIframeSelection if ourIframeSelection
selectedText = ourIframeSelection selectedText = ourIframeSelection
else if parentDocumentSelection
selectedText = parentDocumentSelection
else else
selectedText = input[0].value.substring(startPos, endPos) selectedText = input[0].value.substring(startPos, endPos)
textBefore = input[0].value.substring(0, (startPos)) textBefore = input[0].value.substring(0, (startPos))
......
...@@ -43,7 +43,12 @@ ...@@ -43,7 +43,12 @@
} }
// Markdown Controls //////////////////////// // Markdown Editor Controls ////////////////////////
privacy {
position: relative;
top: 2px;
}
.markdown { .markdown {
.preview { .preview {
overflow: auto; overflow: auto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment