Skip to content

Commit 4a5dbc9

Browse files
author
Diego
committed
*
1 parent c8cbf20 commit 4a5dbc9

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

admin/boot/rules/98-constants.bit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ define('NIBBLEBLOG_VERSION', '4.0');
1717
define('NIBBLEBLOG_NAME', 'Coffee');
1818
define('NIBBLEBLOG_RELEASE_DATE', '02/02/2014');
1919
define('NIBBLEBLOG_BUILD', 1391376286);
20-
define('NIBBLEBLOG_MARKDOWN', FALSE);
2120

2221
// =====================================================================
2322
// DEBUG

admin/views/page/includes/content.bit

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ $(document).ready(function() {
9191

9292
function insert_content(text)
9393
{
94-
<?php if(NIBBLEBLOG_MARKDOWN) { ?>
95-
var content = $("#js_content").val();
96-
$("#js_content").val( content + text);
97-
<?php } else { ?>
94+
if(typeof tinymce != 'undefined')
95+
{
9896
tinymce.execCommand("mceInsertContent", false, text);
99-
<?php } ?>
97+
}
98+
else
99+
{
100+
var content = $("#js_content").val();
101+
$("#js_content").val(content + "\n" + text + "\n");
102+
}
100103
}
101104

102105
</script>

admin/views/post/includes/content.bit

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ $(document).ready(function() {
9191

9292
function insert_content(text)
9393
{
94-
<?php if(NIBBLEBLOG_MARKDOWN) { ?>
95-
var content = $("#js_content").val();
96-
$("#js_content").val( content + text);
97-
<?php } else { ?>
94+
if(typeof tinymce != 'undefined')
95+
{
9896
tinymce.execCommand("mceInsertContent", false, text);
99-
<?php } ?>
97+
}
98+
else
99+
{
100+
var content = $("#js_content").val();
101+
$("#js_content").val(content + "\n" + text + "\n");
102+
}
100103
}
101104

102105
</script>

0 commit comments

Comments
 (0)