summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.jshintrc1
-rw-r--r--bower.json1
-rw-r--r--client/components/main/editor.jade7
-rw-r--r--client/components/main/editor.js2
-rw-r--r--client/components/main/editor.styl2
-rw-r--r--client/components/main/templates.html5
6 files changed, 15 insertions, 3 deletions
diff --git a/.jshintrc b/.jshintrc
index a03f740f..0fba3196 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -43,6 +43,7 @@
// Exported by packages we use
"_": false,
"$": false,
+ "autosize": false,
"Router": false,
"SimpleSchema": false,
"getSlug": false,
diff --git a/bower.json b/bower.json
index deca1fda..5577575b 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,7 @@
{
"name": "LibreBoard",
"dependencies": {
+ "autosize": "3.0.6",
"perfect-scrollbar": "0.6.2"
},
"private": true
diff --git a/client/components/main/editor.jade b/client/components/main/editor.jade
new file mode 100644
index 00000000..cb01cdc1
--- /dev/null
+++ b/client/components/main/editor.jade
@@ -0,0 +1,7 @@
+template(name="editor")
+ textarea.editor(
+ class="{{class}}"
+ id=id
+ autofocus=autofocus
+ placeholder="{{_ 'comment-placeholder'}}")
+ +Template.contentBlock
diff --git a/client/components/main/editor.js b/client/components/main/editor.js
index e1a90cb1..68e278ee 100644
--- a/client/components/main/editor.js
+++ b/client/components/main/editor.js
@@ -3,6 +3,8 @@ var dropdownMenuIsOpened = false;
Template.editor.onRendered(function() {
var $textarea = this.$('textarea');
+ autosize($textarea);
+
$textarea.textcomplete([
// Emojies
{
diff --git a/client/components/main/editor.styl b/client/components/main/editor.styl
new file mode 100644
index 00000000..1dc02047
--- /dev/null
+++ b/client/components/main/editor.styl
@@ -0,0 +1,2 @@
+textarea.editor
+ min-height: 100px
diff --git a/client/components/main/templates.html b/client/components/main/templates.html
index c252f1e4..876eb13a 100644
--- a/client/components/main/templates.html
+++ b/client/components/main/templates.html
@@ -11,8 +11,7 @@
</div>
</template>
-<template name="editor">
- <textarea class="{{class}}" placeholder="{{_ 'comment-placeholder'}}" id="{{id}}" autofocus="{{autofocus}}">{{> UI.contentBlock}}</textarea>
-</template>
+<!-- XXX This should be moved to editor.jade but there is an issue with jade
+ handling of the markdown component. -->
<template name="viewer">{{#markdown}}{{#emoji}}{{#mentions}}{{> UI.contentBlock }}{{/mentions}}{{/emoji}}{{/markdown}}</template>