mirror of
https://github.com/fazo96/markcloud.git
synced 2025-01-10 11:04:21 +01:00
added ace editor
This commit is contained in:
parent
4f7f3c5de1
commit
5399e44104
@ -15,4 +15,4 @@ mrt:moment
|
||||
reactive-var
|
||||
kevohagan:sweetalert
|
||||
accounts-twitter
|
||||
|
||||
mandrill:ace
|
||||
|
@ -36,6 +36,7 @@ less@1.0.9
|
||||
livedata@1.0.10
|
||||
localstorage@1.0.0
|
||||
logging@1.0.3
|
||||
mandrill:ace@1.0.2
|
||||
meteor-platform@1.1.1
|
||||
meteor@1.1.1
|
||||
minifiers@1.1.0
|
||||
@ -63,6 +64,7 @@ sha@1.0.0
|
||||
spacebars-compiler@1.0.2
|
||||
spacebars@1.0.2
|
||||
srp@1.0.0
|
||||
standard-app-packages@1.0.2
|
||||
templating@1.0.7
|
||||
tracker@1.0.2
|
||||
twitter@1.1.0
|
||||
|
@ -61,6 +61,9 @@ Router.map ->
|
||||
controller: loggedInController
|
||||
waitOn: -> Meteor.subscribe 'doc', @params._id
|
||||
data: -> docs.findOne @params._id
|
||||
action: ->
|
||||
if !Meteor.user() then @render '404'
|
||||
else if @ready() then @render()
|
||||
@route 'profile',
|
||||
path: '/@:user'
|
||||
waitOn: ->
|
||||
@ -102,6 +105,13 @@ Template.home.events
|
||||
else
|
||||
Meteor.subscribe 'user'
|
||||
notify type: 'success', msg: 'Logged in'
|
||||
|
||||
Template.editor.rendered = ->
|
||||
ed = MandrillAce.getInstance(); ed.isFocused()
|
||||
#ed.setTheme 'ace/theme/monokai'
|
||||
ed.setMode 'ace/mode/markdown'
|
||||
if Router.current().data().text
|
||||
ed.ace.setValue Router.current().data().text
|
||||
Template.editor.isPublic = -> return "checked" if @public is yes
|
||||
Template.editor.showTitleChecked = -> return "checked" unless @showTitle is no
|
||||
Template.editor.events
|
||||
|
@ -49,6 +49,18 @@
|
||||
#title {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#mandrill_ace {
|
||||
height: 400px;
|
||||
/*
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
*/
|
||||
}
|
||||
#editor {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
|
@ -106,7 +106,8 @@ You will be able to delete your account and all your data whenever you want.
|
||||
Show title in document
|
||||
<input type="checkbox" id="make-public" {{isPublic}}>
|
||||
Make document visible on your profile
|
||||
<textarea id="editor" class="form-control" rows="10" placeholder="Write your markdown :)" autofocus>{{text}}</textarea>
|
||||
<!--<textarea id="editor" class="form-control" rows="10" placeholder="Write your markdown :)" autofocus>{{text}}</textarea>-->
|
||||
{{> mandrill_ace}}
|
||||
<p>Remember that this app is still in development so you should keep a backup
|
||||
of your text somewhere else in case something goes wrong!</p>
|
||||
<button id="upload" class="btn btn-primary">
|
||||
|
Loading…
Reference in New Issue
Block a user