Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
2882b7d0
Commit
2882b7d0
authored
Sep 16, 2014
by
RawKStar77
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs by getting rid of a bad idea. Tighten up styles.
parent
1e1a1dfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
markdown.coffee
h/static/scripts/directives/markdown.coffee
+1
-4
annotations.scss
h/static/styles/annotations.scss
+6
-1
No files found.
h/static/scripts/directives/markdown.coffee
View file @
2882b7d0
# 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.
markdown
=
[
'$filter'
,
'$timeout'
,
(
$filter
,
$timeout
)
->
...
...
@@ -11,14 +11,11 @@ markdown = ['$filter', '$timeout', ($filter, $timeout) ->
scope
.
returnSelection
=
->
# Maybe get selections from other parts of the text? Such as the quote or a reply?
ourIframeSelection
=
window
.
getSelection
().
toString
()
parentDocumentSelection
=
parent
.
window
.
getSelection
().
toString
()
if
input
[
0
].
selectionStart
!=
undefined
startPos
=
input
[
0
].
selectionStart
endPos
=
input
[
0
].
selectionEnd
if
ourIframeSelection
selectedText
=
ourIframeSelection
else
if
parentDocumentSelection
selectedText
=
parentDocumentSelection
else
selectedText
=
input
[
0
].
value
.
substring
(
startPos
,
endPos
)
textBefore
=
input
[
0
].
value
.
substring
(
0
,
(
startPos
))
...
...
h/static/styles/annotations.scss
View file @
2882b7d0
...
...
@@ -43,7 +43,12 @@
}
// Markdown Controls ////////////////////////
// Markdown Editor Controls ////////////////////////
privacy
{
position
:
relative
;
top
:
2px
;
}
.markdown
{
.preview
{
overflow
:
auto
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment