mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Autosize the rich editor (for card description and comments)
This commit is contained in:
parent
56a240a643
commit
a12f094710
6 changed files with 15 additions and 3 deletions
|
|
@ -43,6 +43,7 @@
|
||||||
// Exported by packages we use
|
// Exported by packages we use
|
||||||
"_": false,
|
"_": false,
|
||||||
"$": false,
|
"$": false,
|
||||||
|
"autosize": false,
|
||||||
"Router": false,
|
"Router": false,
|
||||||
"SimpleSchema": false,
|
"SimpleSchema": false,
|
||||||
"getSlug": false,
|
"getSlug": false,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "LibreBoard",
|
"name": "LibreBoard",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"autosize": "3.0.6",
|
||||||
"perfect-scrollbar": "0.6.2"
|
"perfect-scrollbar": "0.6.2"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
|
|
|
||||||
7
client/components/main/editor.jade
Normal file
7
client/components/main/editor.jade
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
template(name="editor")
|
||||||
|
textarea.editor(
|
||||||
|
class="{{class}}"
|
||||||
|
id=id
|
||||||
|
autofocus=autofocus
|
||||||
|
placeholder="{{_ 'comment-placeholder'}}")
|
||||||
|
+Template.contentBlock
|
||||||
|
|
@ -3,6 +3,8 @@ var dropdownMenuIsOpened = false;
|
||||||
Template.editor.onRendered(function() {
|
Template.editor.onRendered(function() {
|
||||||
var $textarea = this.$('textarea');
|
var $textarea = this.$('textarea');
|
||||||
|
|
||||||
|
autosize($textarea);
|
||||||
|
|
||||||
$textarea.textcomplete([
|
$textarea.textcomplete([
|
||||||
// Emojies
|
// Emojies
|
||||||
{
|
{
|
||||||
|
|
|
||||||
2
client/components/main/editor.styl
Normal file
2
client/components/main/editor.styl
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
textarea.editor
|
||||||
|
min-height: 100px
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="editor">
|
<!-- XXX This should be moved to editor.jade but there is an issue with jade
|
||||||
<textarea class="{{class}}" placeholder="{{_ 'comment-placeholder'}}" id="{{id}}" autofocus="{{autofocus}}">{{> UI.contentBlock}}</textarea>
|
handling of the markdown component. -->
|
||||||
</template>
|
|
||||||
|
|
||||||
<template name="viewer">{{#markdown}}{{#emoji}}{{#mentions}}{{> UI.contentBlock }}{{/mentions}}{{/emoji}}{{/markdown}}</template>
|
<template name="viewer">{{#markdown}}{{#emoji}}{{#mentions}}{{> UI.contentBlock }}{{/mentions}}{{/emoji}}{{/markdown}}</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue