diff --git a/client/homebrew/editPage/editPage.jsx b/client/homebrew/editPage/editPage.jsx index 16029ba..ec6e96e 100644 --- a/client/homebrew/editPage/editPage.jsx +++ b/client/homebrew/editPage/editPage.jsx @@ -6,6 +6,8 @@ var Statusbar = require('../statusbar/statusbar.jsx'); var PHB = require('../phb/phb.jsx'); var Editor = require('../editor/editor.jsx'); +var FullClassGen = require('../editor/snippets/fullclass.gen.js'); + var request = require("superagent"); var EditPage = React.createClass({ @@ -36,6 +38,12 @@ var EditPage = React.createClass({ if(!self.state.pending) return; return "You have unsaved changes!"; } + + if(this.state.text === ""){ + this.setState({ + text : FullClassGen() + }) + } }, handleTextChange : function(text){ diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 79727d7..6857a21 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -1,69 +1,8 @@ var React = require('react'); var _ = require('lodash'); var cx = require('classnames'); +var SnippetIcons = require('./snippets/snippets.js'); -var Snippets = require('./snippets.js'); - - -var Icons = [ - { - icon : 'fa-book', - snippet : Snippets.intro, - tooltip : 'Intro' - }, - { - icon : 'fa-magic', - snippet : Snippets.spell, - tooltip : 'Spell' - }, - { - icon : 'fa-bookmark', - snippet : Snippets.classFeatures, - tooltip : 'Class Intro' - }, - { - icon : 'fa-trophy', - snippet : Snippets.destroyUndead, - tooltip : 'Class Feature' - }, - { - icon : 'fa-sticky-note', - snippet : Snippets.note, - tooltip : 'Note' - }, - { - icon : 'fa-bug', - snippet : Snippets.statBlock, - tooltip : 'Monster Stat Block' - }, - { - icon : 'fa-table', - snippet : Snippets.classTable, - tooltip : "Class Table" - }, - { - icon : 'fa-columns', - snippet : "```\n```\n\n", - tooltip : "Column Break" - }, - { - icon : 'fa-file-text', - snippet : "\\pagen\n\n", - tooltip : "New Page" - }, - { - icon : 'fa-arrows-v', - snippet : "
\n\n", - tooltip : "Vertical Spacing" - }, - { - icon : 'fa-image', - snippet : "