-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from nextcloud/simplemde
Switch editor from mdedit to simplemde
- Loading branch information
Showing
231 changed files
with
37,835 additions
and
13,178 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 was deleted.
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,25 @@ | ||
/** | ||
* Copyright (c) 2016, Hendrik Leppelsack | ||
* This file is licensed under the Affero General Public License version 3 or | ||
* later. | ||
* See the COPYING file. | ||
*/ | ||
|
||
app.factory('debounce', ['$timeout', function($timeout) { | ||
'use strict'; | ||
|
||
return function debounce(func, delay) { | ||
var timeout; | ||
|
||
return function() { | ||
var context = this, args = arguments; | ||
|
||
if(timeout) { | ||
$timeout.cancel(timeout); | ||
} | ||
timeout = $timeout(function() { | ||
func.apply(context, args); | ||
}, delay); | ||
}; | ||
}; | ||
}]); |
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,40 @@ | ||
/** | ||
* Copyright (c) 2016, Hendrik Leppelsack | ||
* This file is licensed under the Affero General Public License version 3 or | ||
* later. | ||
* See the COPYING file. | ||
*/ | ||
|
||
// finds the url which should be opened when a link is clicked | ||
// example: '[hello](http://example.com)' | ||
app.factory('urlFinder', [function() { | ||
'use strict'; | ||
|
||
return function urlFinder(element) { | ||
element = $(element); | ||
|
||
// special case: click on ')' | ||
if(element.is('.cm-url.cm-formatting')) { | ||
if(element.prev().length !== 0) { | ||
element = element.prev(); | ||
} | ||
} | ||
|
||
// skip '[hello]' | ||
while(element.is('.cm-link')) { | ||
element = element.next(); | ||
} | ||
|
||
// skip '(' | ||
while(element.is('.cm-url.cm-formatting')) { | ||
element = element.next(); | ||
} | ||
|
||
// check if we actually have a cm-url | ||
if(element.is('.cm-url:not(.cm-formatting)')) { | ||
return element.text(); | ||
} | ||
|
||
return undefined; | ||
}; | ||
}]); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.