aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook-blue/theme.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-10 16:07:05 -0700
committerfriendica <info@friendica.com>2012-04-10 16:07:05 -0700
commit703bfcb6d4bd21e68aaabd5f1b256106c505f0e9 (patch)
treec4fc85a1c8cdacaed03fb358a11a714f4e556e18 /view/theme/diabook-blue/theme.php
parent14d68a0dc031b271d26e735160651da52b55d562 (diff)
parent0e97e2338a697141965e74ed3c68f7cd1aff4f7f (diff)
downloadvolse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.tar.gz
volse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.tar.bz2
volse-hubzilla-703bfcb6d4bd21e68aaabd5f1b256106c505f0e9.zip
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'view/theme/diabook-blue/theme.php')
-rwxr-xr-xview/theme/diabook-blue/theme.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php
index f63f15fd9..435ecaf92 100755
--- a/view/theme/diabook-blue/theme.php
+++ b/view/theme/diabook-blue/theme.php
@@ -527,10 +527,16 @@ function insertFormatting(BBcode,id) {
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
+ if (BBcode == "url"){
+ selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
+ } else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
+ if (BBcode == "url"){
+ textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
+ } else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;