diff --git a/.gitignore b/.gitignore index 2707b00..3b9c3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules -yarn.lock \ No newline at end of file +yarn.lock +yarn-error.log \ No newline at end of file diff --git a/client/dist/bundle.min.js b/client/dist/bundle.min.js index e188855..dc6b836 100644 --- a/client/dist/bundle.min.js +++ b/client/dist/bundle.min.js @@ -47,6 +47,7 @@ 'use strict'; __webpack_require__(1); + __webpack_require__(14); /***/ }), /* 1 */ @@ -54,21 +55,737 @@ 'use strict'; + var _jquery = __webpack_require__(2); + + var _jquery2 = _interopRequireDefault(_jquery); + + var _react = __webpack_require__(3); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(4); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactApollo = __webpack_require__(5); + + var _Injector = __webpack_require__(6); + + var _InsertEmbedModal = __webpack_require__(7); + + var _InsertEmbedModal2 = _interopRequireDefault(_InsertEmbedModal); + + var _MarkdownEmbedModal = __webpack_require__(13); + + var _MarkdownEmbedModal2 = _interopRequireDefault(_MarkdownEmbedModal); + + var _FormBuilderModal = __webpack_require__(11); + + var _FormBuilderModal2 = _interopRequireDefault(_FormBuilderModal); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + // import { ApolloProvider } from 'react-apollo'; + console.log(window.InsertEmbedModal); + // import InsertEmbedModal from 'components/InsertEmbedModal/InsertEmbedModal'; + + console.log(_InsertEmbedModal2.default); + var InjectableInsertEmbedModal = (0, _Injector.provideInjector)(_InsertEmbedModal2.default); + var filter = 'div[data-shortcode="embed"]'; + + console.log(InjectableInsertEmbedModal); + _jquery2.default.entwine('ss', function ($) { + + $('#insert-md-embed-react__dialog-wrapper').entwine({ + + Element: null, + + Data: {}, + + onunmatch: function onunmatch() { + // solves errors given by ReactDOM "no matched root found" error. + this._clearModal(); + }, + _clearModal: function _clearModal() { + _reactDom2.default.unmountComponentAtNode(this[0]); + }, + open: function open() { + this._renderModal(true); + }, + close: function close() { + this.setData({}); + this._renderModal(false); + }, + + + /** + * Renders the react modal component + * + * @param {boolean} show + * @private + */ + _renderModal: function _renderModal(show) { + var _this = this; + + // alert('test'); + var handleHide = function handleHide() { + return _this.close(); + }; + // Inserts embed into page + var handleInsert = function handleInsert() { + return _this._handleInsert.apply(_this, arguments); + }; + // Create edit form from url + var handleCreate = function handleCreate() { + return _this._handleCreate.apply(_this, arguments); + }; + var handleLoadingError = function handleLoadingError() { + return _this._handleLoadingError.apply(_this, arguments); + }; + var store = window.ss.store; + var client = window.ss.apolloClient; + var attrs = this.getOriginalAttributes(); + + // create/update the react component + _reactDom2.default.render(_react2.default.createElement( + _reactApollo.ApolloProvider, + { store: store, client: client }, + _react2.default.createElement(InjectableInsertEmbedModal, { + show: show, + type: 'insert-media', + onCreate: handleCreate, + onInsert: handleInsert, + onHide: handleHide, + onLoadingError: handleLoadingError, + fileAttributes: attrs, + bodyClassName: 'modal__dialog modal__dialog--scrollable', + className: 'insert-embed-react__dialog-wrapper' + }) + ), this[0]); + }, + _handleLoadingError: function _handleLoadingError() { + this.setData({}); + this.open(); + }, + + + /** + * Handles inserting the selected file in the modal + * + * @param {object} data + * @returns {Promise} + * @private + */ + _handleInsert: function _handleInsert(data) { + var oldData = this.getData(); + this.setData(Object.assign({ Url: oldData.Url }, data)); + this.insertRemote(); + this.close(); + }, + _handleCreate: function _handleCreate(data) { + this.setData(Object.assign({}, this.getData(), data)); + this.open(); + }, + + + /** + * Find the selected node and get attributes associated to attach the data to the form + * + * @returns {object} + */ + getOriginalAttributes: function getOriginalAttributes() { + var data = this.getData(); + return data; + }, + + + /** + * Calculate placement from css class + */ + findPosition: function findPosition(cssClass) { + var alignments = ['leftAlone', 'center', 'rightAlone', 'left', 'right']; + if (typeof cssClass !== 'string') { + return ''; + } + var classes = cssClass.split(' '); + return alignments.find(function (alignment) { + return classes.indexOf(alignment) > -1; + }); + }, + insertRemote: function insertRemote() { + var $field = this.getElement(); + if (!$field) { + return false; + } + + var data = this.getData(); + + var base = (0, _jquery2.default)('
').attr('data-url', data.Url).attr('data-shortcode', 'embed').addClass(data.Placement).addClass('embed'); + + var placeholder = (0, _jquery2.default)('').attr('src', data.PreviewUrl).addClass('placeholder'); + + // Set dimensions + if (data.Width) { + base.width(data.Width); + placeholder.attr('width', data.Width); + } + if (data.Height) { + // Note: Leave height auto sizing on parent, but set height on inner placeholder + placeholder.attr('height', data.Height); + } + + // Add caption p tag + if (data.CaptionText) { + var caption = (0, _jquery2.default)('').addClass('caption').text(data.CaptionText); + base.append(caption); + } + + // Add to base + base.append(placeholder); + + var pos = $field.codemirror.getCursor(); + $field.codemirror.setSelection(pos, pos); + $field.codemirror.replaceSelection("\n" + $('').append(base.clone()).html() + "\n"); + return true; + } + }); + }); + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + + module.exports = jQuery; + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + module.exports = React; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + module.exports = ReactDom; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + + module.exports = ReactApollo; + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + + module.exports = Injector; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.InsertEmbedModal = undefined; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _react = __webpack_require__(2); + var _i18n = __webpack_require__(8); + + var _i18n2 = _interopRequireDefault(_i18n); + + var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); - var _reactDom = __webpack_require__(3); + var _redux = __webpack_require__(9); + + var _reactRedux = __webpack_require__(10); + + var _FormBuilderModal = __webpack_require__(11); + + var _FormBuilderModal2 = _interopRequireDefault(_FormBuilderModal); + + var _SchemaActions = __webpack_require__(12); + + var schemaActions = _interopRequireWildcard(_SchemaActions); + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var sectionConfigKey = 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin'; + + var InsertEmbedModal = function (_Component) { + _inherits(InsertEmbedModal, _Component); + + function InsertEmbedModal(props) { + _classCallCheck(this, InsertEmbedModal); + + var _this = _possibleConstructorReturn(this, (InsertEmbedModal.__proto__ || Object.getPrototypeOf(InsertEmbedModal)).call(this, props)); + + _this.handleSubmit = _this.handleSubmit.bind(_this); + return _this; + } + + _createClass(InsertEmbedModal, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setOverrides(this.props); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(props) { + if (props.show && !this.props.show) { + this.setOverrides(props); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.clearOverrides(); + } + + /** + * Compares the current properties with received properties and determines if overrides need to be + * cleared or added. + * + * @param {object} props + */ + + }, { + key: 'setOverrides', + value: function setOverrides(props) { + if (this.props.schemaUrl !== props.schemaUrl) { + this.clearOverrides(); + } + if (props.schemaUrl) { + var attrs = Object.assign({}, props.fileAttributes); + delete attrs.ID; + + var overrides = { + fields: Object.entries(attrs).map(function (field) { + var _field = _slicedToArray(field, 2), + name = _field[0], + value = _field[1]; + + return { name: name, value: value }; + }) + }; + // set overrides into redux store, so that it can be accessed by FormBuilder with the same + // schemaUrl. + this.props.actions.schema.setSchemaStateOverrides(props.schemaUrl, overrides); + } + } + + /** + * Generates the properties for the modal + * + * @returns {object} + */ + + }, { + key: 'getModalProps', + value: function getModalProps() { + var props = Object.assign({ + handleSubmit: this.handleSubmit, + onLoadingError: this.handleLoadingError, + showErrorMessage: true, + responseClassBad: 'alert alert-danger', + identifier: 'AssetAdmin.InsertEmbedModal' + }, this.props, { + className: 'insert-embed-modal ' + this.props.className, + bsSize: 'lg', + handleHide: this.props.onHide, + title: this.props.targetUrl ? _i18n2.default._t('AssetAdmin.EditTitle', 'Media from the web') : _i18n2.default._t('AssetAdmin.CreateTitle', 'Insert new media from the web') + }); + delete props.onHide; + delete props.sectionConfig; + delete props.onInsert; + delete props.fileAttributes; + + return props; + } + + /** + * Clear any overrides that may be in place + */ + + }, { + key: 'clearOverrides', + value: function clearOverrides() { + this.props.actions.schema.setSchemaStateOverrides(this.props.schemaUrl, null); + } + + /** + * Handler for when loading the form returns an error + * + * @param error + */ + + }, { + key: 'handleLoadingError', + value: function handleLoadingError(error) { + if (typeof this.props.onLoadingError === 'function') { + this.props.onLoadingError(error); + } + } + + /** + * Capture submission in the form and stop the default submit behaviour + * + * @param data + * @param action + * @returns {Promise} + */ + + }, { + key: 'handleSubmit', + value: function handleSubmit(data, action) { + switch (action) { + case 'action_addmedia': + { + this.props.onCreate(data); + break; + } + case 'action_insertmedia': + { + this.props.onInsert(data); + break; + } + case 'action_cancel': + { + this.props.onHide(); + break; + } + default: + { + // noop + } + } + + return Promise.resolve(); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement(_FormBuilderModal2.default, this.getModalProps()); + } + }]); + + return InsertEmbedModal; + }(_react.Component); + + InsertEmbedModal.propTypes = { + sectionConfig: _react.PropTypes.shape({ + url: _react.PropTypes.string, + form: _react.PropTypes.object + }), + show: _react.PropTypes.bool, + onInsert: _react.PropTypes.func.isRequired, + onCreate: _react.PropTypes.func.isRequired, + fileAttributes: _react.PropTypes.shape({ + Url: _react.PropTypes.string, + CaptionText: _react.PropTypes.string, + PreviewUrl: _react.PropTypes.string, + Placement: _react.PropTypes.string, + Width: _react.PropTypes.number, + Height: _react.PropTypes.number + }), + onHide: _react.PropTypes.func.isRequired, + className: _react.PropTypes.string, + actions: _react.PropTypes.object, + schemaUrl: _react.PropTypes.string.isRequired, + targetUrl: _react.PropTypes.string, + onLoadingError: _react.PropTypes.func + }; + + InsertEmbedModal.defaultProps = { + className: '', + fileAttributes: {} + }; + + function mapStateToProps(state, ownProps) { + var sectionConfig = state.config.sections.find(function (section) { + return section.name === sectionConfigKey; + }); + + // get the schemaUrl to use as a key for overrides + var targetUrl = ownProps.fileAttributes ? ownProps.fileAttributes.Url : ''; + var baseEditUrl = sectionConfig.form.remoteEditForm.schemaUrl; + + var editUrl = targetUrl && baseEditUrl + '/?embedurl=' + encodeURIComponent(targetUrl); + var createUrl = sectionConfig.form.remoteCreateForm.schemaUrl; + + var schemaUrl = editUrl || createUrl; + + return { + sectionConfig: sectionConfig, + schemaUrl: schemaUrl, + targetUrl: targetUrl + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: { + schema: (0, _redux.bindActionCreators)(schemaActions, dispatch) + } + }; + } + + exports.InsertEmbedModal = InsertEmbedModal; + exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(InsertEmbedModal); + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + module.exports = i18n; + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + module.exports = Redux; + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + + module.exports = ReactRedux; + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + + module.exports = FormBuilderModal; + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + + module.exports = SchemaActions; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.MarkdownEmbedModal = undefined; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _i18n = __webpack_require__(8); + + var _i18n2 = _interopRequireDefault(_i18n); + + var _react = __webpack_require__(3); + + var _react2 = _interopRequireDefault(_react); + + var _redux = __webpack_require__(9); + + var _reactRedux = __webpack_require__(10); + + var _FormBuilderModal = __webpack_require__(11); + + var _FormBuilderModal2 = _interopRequireDefault(_FormBuilderModal); + + var _SchemaActions = __webpack_require__(12); + + var schemaActions = _interopRequireWildcard(_SchemaActions); + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var sectionConfigKey = 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin'; + + var MarkdownEmbedModal = function (_Component) { + _inherits(MarkdownEmbedModal, _Component); + + function MarkdownEmbedModal(props) { + _classCallCheck(this, MarkdownEmbedModal); + + return _possibleConstructorReturn(this, (MarkdownEmbedModal.__proto__ || Object.getPrototypeOf(MarkdownEmbedModal)).call(this, props)); + + //this.handleSubmit = this.handleSubmit.bind(this); + } + + _createClass(MarkdownEmbedModal, [{ + key: 'getModalProps', + value: function getModalProps() { + + var props = Object.assign({ + handleSubmit: this.handleSubmit, + onLoadingError: this.handleLoadingError, + showErrorMessage: true, + responseClassBad: 'alert alert-danger', + identifier: 'AssetAdmin.InsertEmbedModal' + }, this.props, { + className: 'insert-media-modal ' + this.props.className, + bsSize: 'lg', + handleHide: this.props.onHide, + title: this.props.targetUrl ? _i18n2.default._t('AssetAdmin.EditTitle', 'Media from the web') : _i18n2.default._t('AssetAdmin.CreateTitle', 'Insert new media from the web') + }); + + delete props.onHide; + delete props.sectionConfig; + delete props.onInsert; + delete props.fileAttributes; + + return props; + } + }, { + key: 'handleSubmit', + value: function handleSubmit(data, action) { + switch (action) { + case 'action_addmedia': + { + //this.props.onCreate(data); + break; + } + case 'action_insertmedia': + { + //this.props.onInsert(data); + break; + } + case 'action_cancel': + { + //this.props.onHide(); + break; + } + default: + { + // noop + } + } + + return Promise.resolve(); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement(_FormBuilderModal2.default, this.getModalProps()); + } + }]); + + return MarkdownEmbedModal; + }(_react.Component); + + MarkdownEmbedModal.propTypes = { + sectionConfig: _react.PropTypes.shape({ + url: _react.PropTypes.string, + form: _react.PropTypes.object + }), + show: _react.PropTypes.bool, + onInsert: _react.PropTypes.func.isRequired, + onCreate: _react.PropTypes.func.isRequired, + fileAttributes: _react.PropTypes.shape({ + Url: _react.PropTypes.string, + CaptionText: _react.PropTypes.string, + PreviewUrl: _react.PropTypes.string, + Placement: _react.PropTypes.string, + Width: _react.PropTypes.number, + Height: _react.PropTypes.number + }), + onHide: _react.PropTypes.func.isRequired, + className: _react.PropTypes.string, + actions: _react.PropTypes.object, + schemaUrl: _react.PropTypes.string.isRequired, + targetUrl: _react.PropTypes.string, + onLoadingError: _react.PropTypes.func + }; + + MarkdownEmbedModal.defaultProps = { + className: '', + fileAttributes: {} + }; + + function mapStateToProps(state, ownProps) { + var sectionConfig = state.config.sections.find(function (section) { + return section.name === sectionConfigKey; + }); + + // get the schemaUrl to use as a key for overrides + var targetUrl = ownProps.fileAttributes ? ownProps.fileAttributes.Url : ''; + var baseEditUrl = sectionConfig.form.remoteEditForm.schemaUrl; + + var editUrl = targetUrl && baseEditUrl + '/?embedurl=' + encodeURIComponent(targetUrl); + var createUrl = sectionConfig.form.remoteCreateForm.schemaUrl; + + var schemaUrl = editUrl || createUrl; + + return { + sectionConfig: sectionConfig, + //schemaUrl, + targetUrl: targetUrl + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: { + schema: (0, _redux.bindActionCreators)(schemaActions, dispatch) + } + }; + } + + exports.MarkdownEmbedModal = MarkdownEmbedModal; + exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(MarkdownEmbedModal); + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _react = __webpack_require__(3); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); - var _reactSimplemdeEditor = __webpack_require__(4); + var _reactSimplemdeEditor = __webpack_require__(15); var _reactSimplemdeEditor2 = _interopRequireDefault(_reactSimplemdeEditor); - var _Injector = __webpack_require__(9); + var _Injector = __webpack_require__(6); + + var _jquery = __webpack_require__(2); + + var _jquery2 = _interopRequireDefault(_jquery); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -78,7 +795,133 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var SimpleMDE = __webpack_require__(10); + var SimpleMDE = __webpack_require__(20); + + + var markdownConfigs = {}; + + _jquery2.default.entwine('ss', function ($) { + + markdownConfigs.toolbar = [{ + name: "heading", + action: SimpleMDE.toggleHeadingSmaller, + className: "fa fa-header", + title: "Heading HTML" + }, { + name: "bold", + action: SimpleMDE.toggleBold, + className: "fa fa-bold", + title: "Bold" + }, { + name: "italic", + action: SimpleMDE.toggleItalic, + className: "fa fa-italic", + title: "Italic" + }, { + name: "strikethrough", + action: SimpleMDE.toggleStrikethrough, + className: "fa fa-strikethrough", + title: "Strikethrough" + }, "|", { + name: "quote", + action: SimpleMDE.toggleBlockquote, + className: "fa fa-quote-left", + title: "Quote" + }, { + name: "unordered-list", + action: SimpleMDE.toggleUnorderedList, + className: "fa fa-list-ul", + title: "Generic List" + }, { + name: "ordered-list", + action: SimpleMDE.toggleOrderedList, + className: "fa fa-list-ol", + title: "Ordered List" + }, "|", { + name: "link", + action: SimpleMDE.drawLink, + /* + action: function() { + let dialog = jQuery('#insert-link-markdown-react__dialog-wrapper'); + if (!dialog.length) { + dialog = jQuery(''); + jQuery('body').append(dialog); + dialog.dialog({ + autoOpen: false + }); + } + // dialog.setElement(this); + dialog.dialog("open"); + // $(); + // InsertLinkModal + },*/ + className: "fa fa-link", + title: "Create Link" + }, { + name: "embed", + action: function action(editor) { + if (window.InsertMediaModal) { + var dialog = $('#insert-md-embed-react__dialog-wrapper'); + if (!dialog.length) { + dialog = $(''); + $('body').append(dialog); + } + dialog.setElement(editor); + dialog.open(); + } else { + alert('Media embed is not supported'); + } + }, + className: "fa fa-play", + title: "Insert Image" + }, { + name: "image", + //action: SimpleMDE.drawImage, + + action: function action(editor) { + /* + if(window.InsertMediaModal) { + let dialog = $('#insert-md-embed-react__dialog-wrapper'); + if (!dialog.length) { + dialog = $(''); + $('body').append(dialog); + //dialog.dialog({ + // autoOpen: false + // }); + } + console.log(dialog); + dialog.setElement(editor); + dialog.open(); + } + else { + SimpleMDE.drawImage(editor); + } + */ + }, + className: "fa fa-picture-o", + title: "Insert Image" + }, "|", { + name: "preview", + action: SimpleMDE.togglePreview, + className: "fa fa-eye no-disable", + title: "Toggle Preview" + }, { + name: "side-by-side", + action: SimpleMDE.toggleSideBySide, + className: "fa fa-columns no-disable no-mobile", + title: "Toggle Side by Side" + }, { + name: "fullscreen", + action: SimpleMDE.toggleFullScreen, + className: "fa fa-arrows-alt no-disable no-mobile", + title: "Toggle Fullscreen" + }, "|", { + name: "guide", + action: 'https://simplemde.com/markdown-guide', + className: "fa fa-question-circle", + title: "Markdown Guide" + }]; + }); var MarkdownEditorField = function (_React$Component) { _inherits(MarkdownEditorField, _React$Component); @@ -88,89 +931,7 @@ var _this = _possibleConstructorReturn(this, (MarkdownEditorField.__proto__ || Object.getPrototypeOf(MarkdownEditorField)).call(this, props)); - _this.state = { - toolbar: [{ - name: "heading", - action: SimpleMDE.toggleHeadingSmaller, - className: "fa fa-header", - title: "Heading HTML" - }, { - name: "bold", - action: SimpleMDE.toggleBold, - className: "fa fa-bold", - title: "Bold" - }, { - name: "italic", - action: SimpleMDE.toggleItalic, - className: "fa fa-italic", - title: "Italic" - }, { - name: "strikethrough", - action: SimpleMDE.toggleStrikethrough, - className: "fa fa-strikethrough", - title: "Strikethrough" - }, "|", { - name: "quote", - action: SimpleMDE.toggleBlockquote, - className: "fa fa-quote-left", - title: "Quote" - }, { - name: "unordered-list", - action: SimpleMDE.toggleUnorderedList, - className: "fa fa-list-ul", - title: "Generic List" - }, { - name: "ordered-list", - action: SimpleMDE.toggleOrderedList, - className: "fa fa-list-ol", - title: "Ordered List" - }, "|", { - name: "link", - action: SimpleMDE.drawLink, - /* - action: function() { - let dialog = jQuery('#insert-link-markdown-react__dialog-wrapper'); - if (!dialog.length) { - dialog = jQuery(''); - jQuery('body').append(dialog); - dialog.dialog({ - autoOpen: false - }); - } - // dialog.setElement(this); - dialog.dialog("open"); - // $(); - // InsertLinkModal - },*/ - className: "fa fa-link", - title: "Create Link" - }, { - name: "image", - action: SimpleMDE.drawImage, - className: "fa fa-picture-o", - title: "Insert Image" - }, "|", { - name: "preview", - action: SimpleMDE.togglePreview, - className: "fa fa-eye no-disable", - title: "Toggle Preview" - }, { - name: "side-by-side", - action: SimpleMDE.toggleSideBySide, - className: "fa fa-columns no-disable no-mobile", - title: "Toggle Side by Side" - }, { - name: "fullscreen", - action: SimpleMDE.toggleFullScreen, - className: "fa fa-arrows-alt no-disable no-mobile", - title: "Toggle Fullscreen" - }, "|", { - name: "guide", - action: 'https://simplemde.com/markdown-guide', - className: "fa fa-question-circle", - title: "Markdown Guide" - }] - }; + _this.state = markdownConfigs; return _this; } @@ -202,7 +963,7 @@ return MarkdownEditorField; }(_react2.default.Component); - jQuery.entwine('ss', function ($) { + _jquery2.default.entwine('ss', function ($) { $('.js-markdown-container:visible').entwine({ onunmatch: function onunmatch() { this._super(); @@ -219,20 +980,10 @@ }); }); -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - - module.exports = React; - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - module.exports = ReactDom; + exports.default = { MarkdownEditorField: MarkdownEditorField }; /***/ }), -/* 4 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) {(function webpackUniversalModuleDefinition(root, factory) { @@ -37834,10 +38585,10 @@ }); ; //# sourceMappingURL=react-simplemde-editor.js.map - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5).Buffer)) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16).Buffer)) /***/ }), -/* 5 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/*! @@ -37850,9 +38601,9 @@ 'use strict' - var base64 = __webpack_require__(6) - var ieee754 = __webpack_require__(7) - var isArray = __webpack_require__(8) + var base64 = __webpack_require__(17) + var ieee754 = __webpack_require__(18) + var isArray = __webpack_require__(19) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -39633,7 +40384,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }), -/* 6 */ +/* 17 */ /***/ (function(module, exports) { 'use strict' @@ -39753,7 +40504,7 @@ /***/ }), -/* 7 */ +/* 18 */ /***/ (function(module, exports) { exports.read = function (buffer, offset, isLE, mLen, nBytes) { @@ -39843,7 +40594,7 @@ /***/ }), -/* 8 */ +/* 19 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -39854,29 +40605,23 @@ /***/ }), -/* 9 */ -/***/ (function(module, exports) { - - module.exports = Injector; - -/***/ }), -/* 10 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /*global require,module*/ "use strict"; - var CodeMirror = __webpack_require__(11); - __webpack_require__(12); - __webpack_require__(13); - __webpack_require__(14); - __webpack_require__(15); - __webpack_require__(18); - __webpack_require__(19); - __webpack_require__(20); - __webpack_require__(21); - __webpack_require__(16); - var CodeMirrorSpellChecker = __webpack_require__(22); - var marked = __webpack_require__(25); + var CodeMirror = __webpack_require__(21); + __webpack_require__(22); + __webpack_require__(23); + __webpack_require__(24); + __webpack_require__(25); + __webpack_require__(28); + __webpack_require__(29); + __webpack_require__(30); + __webpack_require__(31); + __webpack_require__(26); + var CodeMirrorSpellChecker = __webpack_require__(32); + var marked = __webpack_require__(35); // Some variables @@ -41893,7 +42638,7 @@ module.exports = SimpleMDE; /***/ }), -/* 11 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -51533,7 +52278,7 @@ /***/ }), -/* 12 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -51541,7 +52286,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -51590,13 +52335,13 @@ /***/ }), -/* 13 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE - var CodeMirror = __webpack_require__(11); + var CodeMirror = __webpack_require__(21); CodeMirror.commands.tabAndIndentMarkdownList = function (cm) { var ranges = cm.listSelections(); @@ -51640,7 +52385,7 @@ /***/ }), -/* 14 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -51648,7 +52393,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -51687,7 +52432,7 @@ /***/ }), -/* 15 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -51695,7 +52440,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11), __webpack_require__(16), __webpack_require__(17)); + mod(__webpack_require__(21), __webpack_require__(26), __webpack_require__(27)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../xml/xml", "../meta"], mod); else // Plain browser env @@ -52552,7 +53297,7 @@ /***/ }), -/* 16 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -52560,7 +53305,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -52952,7 +53697,7 @@ /***/ }), -/* 17 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -52960,7 +53705,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../lib/codemirror"], mod); else // Plain browser env @@ -53174,7 +53919,7 @@ /***/ }), -/* 18 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -53191,7 +53936,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -53270,7 +54015,7 @@ /***/ }), -/* 19 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -53278,7 +54023,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -53338,7 +54083,7 @@ /***/ }), -/* 20 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -53352,7 +54097,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11)); + mod(__webpack_require__(21)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env @@ -53463,7 +54208,7 @@ /***/ }), -/* 21 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -53471,7 +54216,7 @@ (function(mod) { if (true) // CommonJS - mod(__webpack_require__(11), __webpack_require__(15), __webpack_require__(18)); + mod(__webpack_require__(21), __webpack_require__(25), __webpack_require__(28)); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod); else // Plain browser env @@ -53598,7 +54343,7 @@ /***/ }), -/* 22 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { // Use strict mode (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) @@ -53606,7 +54351,7 @@ // Requires - var Typo = __webpack_require__(23); + var Typo = __webpack_require__(33); // Create function @@ -53722,7 +54467,7 @@ module.exports = CodeMirrorSpellChecker; /***/ }), -/* 23 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(__dirname, Buffer) {/* globals chrome: false */ @@ -53985,7 +54730,7 @@ } else if (true) { // Node.js - var fs = __webpack_require__(24); + var fs = __webpack_require__(34); try { if (fs.existsSync(path)) { @@ -54656,16 +55401,16 @@ if (true) { module.exports = Typo; } - /* WEBPACK VAR INJECTION */}.call(exports, "/", __webpack_require__(5).Buffer)) + /* WEBPACK VAR INJECTION */}.call(exports, "/", __webpack_require__(16).Buffer)) /***/ }), -/* 24 */ +/* 34 */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), -/* 25 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** diff --git a/client/dist/sourcemaps/bundle.min.css.map b/client/dist/sourcemaps/bundle.min.css.map index cf19da9..1e589a4 100644 --- a/client/dist/sourcemaps/bundle.min.css.map +++ b/client/dist/sourcemaps/bundle.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["bundle.css","../../../node_modules/react-simplemde-editor/dist/simplemde.min.css","bundle.scss"],"names":[],"mappings":"AAAA,YCMA,UAAkB,CAAA,kBAAM,aAA0B,CAAA,gBAAmB,aAAY,CAAA,uDAAiC,qBAA8C,CAAA,oBAAM,4BAAiC,yBAAiC,kBAAqB,CAAA,uBAAQ,oBAA+B,eAAuB,iBAAiB,WAAa,kBAAkB,CAAA,yBAAQ,UAA+B,CAAA,gCAAM,UAAsC,CAAA,mBAAM,2BAA+B,kBAA6B,OAAM,CAAK,2CAAmB,4BAAwC,CAAA,kCAAiC,WAAyB,oBAAc,eAAsB,CAAA,sCAAwB,SAAoB,CAAO,uBAAI,WAA6B,SAAY,gDAA2C,AAA6C,wCAAwC,qBAA0B,CAAA,AAAiD,yBAAc,IAAyB,4BAAqB,CAAA,CAAA,iBAAc,IAAiB,4BAAqB,CAAA,CAAA,QAAc,qBAAgB,uBAA8B,CAAA,kBAAS,2BAA8B,iBAAyB,CAAA,yBAAwB,UAAiB,CAAA,wBAAoB,UAAgB,CAAA,aAAM,UAAmB,CAAA,aAAM,UAAmB,CAAA,sBAAiB,eAAuB,CAAA,OAAK,iBAAkB,CAAA,SAAQ,yBAAyB,CAAA,kBAAW,4BAAkC,CAAA,0BAA4B,UAAkB,CAAA,uBAAoB,UAAe,CAAA,yBAAoB,UAAiB,CAAA,sBAAoB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ent":[".CodeMirror{color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0 !important;border:none !important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{height:auto;min-height:300px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:1}.CodeMirror-scroll{min-height:300px}.CodeMirror-fullscreen{background:#fff;position:fixed !important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50% !important}.editor-toolbar{position:relative;opacity:.6;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:0 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar:after,.editor-toolbar:before{display:block;content:' ';height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar:hover,.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar.fullscreen{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0, #fff), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:linear-gradient(to right, #fff 0, rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0, rgba(255,255,255,0)), color-stop(100%, #fff));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0, #fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}.editor-toolbar a{display:inline-block;text-align:center;text-decoration:none !important;color:#2c3e50 !important;width:30px;height:30px;margin:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar a.fa-header-x:after{font-family:Arial,\"Helvetica Neue\",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:\"1\"}.editor-toolbar a.fa-header-2:after{content:\"2\"}.editor-toolbar a.fa-header-3:after{content:\"3\"}.editor-toolbar a.fa-header-bigger:after{content:\"▲\"}.editor-toolbar a.fa-header-smaller:after{content:\"▼\"}.editor-toolbar.disabled-for-preview a:not(.no-disable){pointer-events:none;background:#fff;border-color:transparent;text-shadow:inherit}@media only screen and (max-width: 700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-preview,.editor-preview-side{padding:10px;background:#fafafa;overflow:auto;display:none;box-sizing:border-box}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .characters:before{content:'characters: '}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;border:1px solid #ddd}.editor-preview-active,.editor-preview-active-side{display:block}.editor-preview-side>p,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,0.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,0.15)}.editor-toolbar.fullscreen{z-index:9999}.CodeMirror-fullscreen{z-index:9999}.editor-preview-side{z-index:9999}textarea.markdowneditor{display:none}.editor-toolbar a{margin:0 2px}\n","/**\n * simplemde v1.11.2\n * Copyright Next Step Webs, Inc.\n * @link https://github.com/NextStepWebs/simplemde-markdown-editor\n * @license MIT\n */\n.CodeMirror{color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{height:auto;min-height:300px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:1}.CodeMirror-scroll{min-height:300px}.CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50%!important}.editor-toolbar{position:relative;opacity:.6;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:0 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar:after,.editor-toolbar:before{display:block;content:' ';height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar:hover,.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar.fullscreen{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,1)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);position:fixed;top:0;right:0;margin:0;padding:0}.editor-toolbar a{display:inline-block;text-align:center;text-decoration:none!important;color:#2c3e50!important;width:30px;height:30px;margin:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar a.fa-header-x:after{font-family:Arial,\"Helvetica Neue\",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:\"1\"}.editor-toolbar a.fa-header-2:after{content:\"2\"}.editor-toolbar a.fa-header-3:after{content:\"3\"}.editor-toolbar a.fa-header-bigger:after{content:\"▲\"}.editor-toolbar a.fa-header-smaller:after{content:\"▼\"}.editor-toolbar.disabled-for-preview a:not(.no-disable){pointer-events:none;background:#fff;border-color:transparent;text-shadow:inherit}@media only screen and (max-width:700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-preview,.editor-preview-side{padding:10px;background:#fafafa;overflow:auto;display:none;box-sizing:border-box}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .characters:before{content:'characters: '}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;border:1px solid #ddd}.editor-preview-active,.editor-preview-active-side{display:block}.editor-preview-side>p,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}","@import \"../../../node_modules/react-simplemde-editor/dist/simplemde.min\";\r\n\r\n\r\n.editor-toolbar.fullscreen {\r\n\tz-index: 9999;\r\n}\r\n\r\n.CodeMirror-fullscreen {\r\n\tz-index: 9999;\r\n}\r\n\r\n.editor-preview-side {\r\n\tz-index: 9999;\r\n}\r\n\r\ntextarea.markdowneditor {\r\n\tdisplay: none;\r\n}\r\n\r\n.editor-toolbar a {\r\n\tmargin: 0 2px;\r\n}"]} \ No newline at end of file +{"version":3,"sources":["bundle.css","../../../node_modules/react-simplemde-editor/dist/simplemde.min.css","bundle.scss"],"names":[],"mappings":"AAAA,YCMA,UAAkB,CAAA,kBAAM,aAA0B,CAAA,gBAAmB,aAAY,CAAA,uDAAiC,qBAA8C,CAAA,oBAAM,4BAAiC,yBAAiC,kBAAqB,CAAA,uBAAQ,oBAA+B,eAAuB,iBAAiB,WAAa,kBAAkB,CAAA,yBAAQ,UAA+B,CAAA,gC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B,CAAA,mDAAuC,aAA4B,CAAO,yCAA+B,YAAkB,CAAA,6CAAkC,gBAAyB,kBAAiB,CAAA,8GAAyH,sBAAgB,WAAgB,CAAA,qCAA0C,aAAc,CAAA,2CAAsC,aAAoB,CAAA,wCAAsC,aAAiB,CAAA,iCAAqB,kBAAgC,CAAA,0CAAsC,eAAa,gBAAgB,CAAA,0CAA+C,eAAa,gBAAgB,CAAA,0CAA+C,eAAa,gBAAgB,CAAA,0CAA+C,eAAa,gBAAgB,CAAA,yCAA+C,4BAAuB,iBAAgB,CAAA,sCAAgD,aAAe,CAAA,qCAAsC,aAAc,CAAA,+CAAsC,4BAAkC,CAAA,oCAA0B,UAAwB,CAAA,qFAAuF,6BAAqB,CAAA,2BCHrzV,YACd,CAAA,uBACA,YAGA,CAAA,qBACA,YAGA,CAAA,wBAGO,YACP,CAAA,kBACA,YAGA,CAAM","file":"../bundle.min.css","sourcesContent":[".CodeMirror{color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0 !important;border:none !important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{height:auto;min-height:300px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:1}.CodeMirror-scroll{min-height:300px}.CodeMirror-fullscreen{background:#fff;position:fixed !important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50% !important}.editor-toolbar{position:relative;opacity:.6;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:0 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar:after,.editor-toolbar:before{display:block;content:' ';height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar:hover,.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar.fullscreen{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0, #fff), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, #fff 0, rgba(255,255,255,0) 100%);background:linear-gradient(to right, #fff 0, rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0, rgba(255,255,255,0)), color-stop(100%, #fff));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0, #fff 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0, #fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}.editor-toolbar a{display:inline-block;text-align:center;text-decoration:none !important;color:#2c3e50 !important;width:30px;height:30px;margin:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar a.fa-header-x:after{font-family:Arial,\"Helvetica Neue\",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:\"1\"}.editor-toolbar a.fa-header-2:after{content:\"2\"}.editor-toolbar a.fa-header-3:after{content:\"3\"}.editor-toolbar a.fa-header-bigger:after{content:\"▲\"}.editor-toolbar a.fa-header-smaller:after{content:\"▼\"}.editor-toolbar.disabled-for-preview a:not(.no-disable){pointer-events:none;background:#fff;border-color:transparent;text-shadow:inherit}@media only screen and (max-width: 700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-preview,.editor-preview-side{padding:10px;background:#fafafa;overflow:auto;display:none;box-sizing:border-box}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .characters:before{content:'characters: '}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;border:1px solid #ddd}.editor-preview-active,.editor-preview-active-side{display:block}.editor-preview-side>p,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,0.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,0.15)}.editor-toolbar.fullscreen{z-index:9999}.CodeMirror-fullscreen{z-index:9999}.editor-preview-side{z-index:9999}textarea.markdowneditor{display:none}.editor-toolbar a{margin:0 2px}\n","/**\n * simplemde v1.11.2\n * Copyright Next Step Webs, Inc.\n * @link https://github.com/NextStepWebs/simplemde-markdown-editor\n * @license MIT\n */\n.CodeMirror{color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{height:auto;min-height:300px;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:1}.CodeMirror-scroll{min-height:300px}.CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-sided{width:50%!important}.editor-toolbar{position:relative;opacity:.6;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:0 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar:after,.editor-toolbar:before{display:block;content:' ';height:1px}.editor-toolbar:before{margin-bottom:8px}.editor-toolbar:after{margin-top:8px}.editor-toolbar:hover,.editor-wrapper input.title:focus,.editor-wrapper input.title:hover{opacity:.8}.editor-toolbar.fullscreen{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,1)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,1) 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,1) 100%);position:fixed;top:0;right:0;margin:0;padding:0}.editor-toolbar a{display:inline-block;text-align:center;text-decoration:none!important;color:#2c3e50!important;width:30px;height:30px;margin:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar a.active,.editor-toolbar a:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar a:before{line-height:30px}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar a.fa-header-x:after{font-family:Arial,\"Helvetica Neue\",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar a.fa-header-1:after{content:\"1\"}.editor-toolbar a.fa-header-2:after{content:\"2\"}.editor-toolbar a.fa-header-3:after{content:\"3\"}.editor-toolbar a.fa-header-bigger:after{content:\"▲\"}.editor-toolbar a.fa-header-smaller:after{content:\"▼\"}.editor-toolbar.disabled-for-preview a:not(.no-disable){pointer-events:none;background:#fff;border-color:transparent;text-shadow:inherit}@media only screen and (max-width:700px){.editor-toolbar a.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-preview,.editor-preview-side{padding:10px;background:#fafafa;overflow:auto;display:none;box-sizing:border-box}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .characters:before{content:'characters: '}.editor-preview{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;border:1px solid #ddd}.editor-preview-active,.editor-preview-active-side{display:block}.editor-preview-side>p,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}","@import \"../../../node_modules/react-simplemde-editor/dist/simplemde.min\";\n\n\n.editor-toolbar.fullscreen {\n\tz-index: 9999;\n}\n\n.CodeMirror-fullscreen {\n\tz-index: 9999;\n}\n\n.editor-preview-side {\n\tz-index: 9999;\n}\n\ntextarea.markdowneditor {\n\tdisplay: none;\n}\n\n.editor-toolbar a {\n\tmargin: 0 2px;\n}"]} \ No newline at end of file diff --git a/client/src/bundles/bundle.js b/client/src/bundles/bundle.js index a01e4f8..a8d1410 100644 --- a/client/src/bundles/bundle.js +++ b/client/src/bundles/bundle.js @@ -1 +1,2 @@ -require('../components/MarkdownEditorField/MarkdownEditorField'); \ No newline at end of file +require('../entwine/Markdown_ssembed'); +require('../components/MarkdownEditorField/MarkdownEditorField'); diff --git a/client/src/components/MarkdownEditorField/MarkdownEditorField.js b/client/src/components/MarkdownEditorField/MarkdownEditorField.js index dbd3d54..603239f 100644 --- a/client/src/components/MarkdownEditorField/MarkdownEditorField.js +++ b/client/src/components/MarkdownEditorField/MarkdownEditorField.js @@ -5,114 +5,173 @@ import ReactDOM from 'react-dom'; const SimpleMDE = require('simplemde'); import ReactSimpleMDE from 'react-simplemde-editor'; import { provideInjector } from 'lib/Injector'; +import jQuery from 'jquery'; + +const markdownConfigs = { + +} + +jQuery.entwine('ss', ($) => { + + + markdownConfigs.toolbar = [ + { + name: "heading", + action: SimpleMDE.toggleHeadingSmaller, + className: "fa fa-header", + title: "Heading HTML", + }, + { + name: "bold", + action: SimpleMDE.toggleBold, + className: "fa fa-bold", + title: "Bold", + }, + { + name: "italic", + action: SimpleMDE.toggleItalic, + className: "fa fa-italic", + title: "Italic", + }, + { + name: "strikethrough", + action: SimpleMDE.toggleStrikethrough, + className: "fa fa-strikethrough", + title: "Strikethrough", + }, + "|", + { + name: "quote", + action: SimpleMDE.toggleBlockquote, + className: "fa fa-quote-left", + title: "Quote", + }, + { + name: "unordered-list", + action: SimpleMDE.toggleUnorderedList, + className: "fa fa-list-ul", + title: "Generic List", + }, + { + name: "ordered-list", + action: SimpleMDE.toggleOrderedList, + className: "fa fa-list-ol", + title: "Ordered List", + }, + "|", + { + name: "link", + action: SimpleMDE.drawLink, + /* + action: function() { + + let dialog = jQuery('#insert-link-markdown-react__dialog-wrapper'); + + if (!dialog.length) { + dialog = jQuery(''); + jQuery('body').append(dialog); + dialog.dialog({ + autoOpen: false + }); + } + + // dialog.setElement(this); + dialog.dialog("open"); + // $(); + // InsertLinkModal + + },*/ + className: "fa fa-link", + title: "Create Link", + }, + { + name: "embed", + action: function(editor) { + if(window.InsertMediaModal) { + let dialog = $('#insert-md-embed-react__dialog-wrapper'); + if (!dialog.length) { + dialog = $(''); + $('body').append(dialog); + } + dialog.setElement(editor); + dialog.open(); + } + else { + alert('Media embed is not supported'); + } + }, + className: "fa fa-play", + title: "Insert Image", + }, + { + name: "image", + //action: SimpleMDE.drawImage, + + action: function(editor) { + /* + if(window.InsertMediaModal) { + let dialog = $('#insert-md-embed-react__dialog-wrapper'); + + if (!dialog.length) { + dialog = $(''); + $('body').append(dialog); + //dialog.dialog({ + // autoOpen: false + // }); + } + + console.log(dialog); + + dialog.setElement(editor); + dialog.open(); + } + else { + SimpleMDE.drawImage(editor); + } + */ + }, + className: "fa fa-picture-o", + title: "Insert Image", + }, + "|", + { + name: "preview", + action: SimpleMDE.togglePreview, + className: "fa fa-eye no-disable", + title: "Toggle Preview", + }, + { + name: "side-by-side", + action: SimpleMDE.toggleSideBySide, + className: "fa fa-columns no-disable no-mobile", + title: "Toggle Side by Side", + }, + { + name: "fullscreen", + action: SimpleMDE.toggleFullScreen, + className: "fa fa-arrows-alt no-disable no-mobile", + title: "Toggle Fullscreen", + }, + "|", + { + name: "guide", + action: 'https://simplemde.com/markdown-guide', + className: "fa fa-question-circle", + title: "Markdown Guide", + }, + ]; + + + + +}); + class MarkdownEditorField extends React.Component { constructor(props) { super(props); - this.state = { - toolbar: [ - { - name: "heading", - action: SimpleMDE.toggleHeadingSmaller, - className: "fa fa-header", - title: "Heading HTML", - }, - { - name: "bold", - action: SimpleMDE.toggleBold, - className: "fa fa-bold", - title: "Bold", - }, - { - name: "italic", - action: SimpleMDE.toggleItalic, - className: "fa fa-italic", - title: "Italic", - }, - { - name: "strikethrough", - action: SimpleMDE.toggleStrikethrough, - className: "fa fa-strikethrough", - title: "Strikethrough", - }, - "|", - { - name: "quote", - action: SimpleMDE.toggleBlockquote, - className: "fa fa-quote-left", - title: "Quote", - }, - { - name: "unordered-list", - action: SimpleMDE.toggleUnorderedList, - className: "fa fa-list-ul", - title: "Generic List", - }, - { - name: "ordered-list", - action: SimpleMDE.toggleOrderedList, - className: "fa fa-list-ol", - title: "Ordered List", - }, - "|", - { - name: "link", - action: SimpleMDE.drawLink, - /* - action: function() { - let dialog = jQuery('#insert-link-markdown-react__dialog-wrapper'); - - if (!dialog.length) { - dialog = jQuery(''); - jQuery('body').append(dialog); - dialog.dialog({ - autoOpen: false - }); - } - - // dialog.setElement(this); - dialog.dialog("open"); - // $(); - // InsertLinkModal - },*/ - className: "fa fa-link", - title: "Create Link", - }, - { - name: "image", - action: SimpleMDE.drawImage, - className: "fa fa-picture-o", - title: "Insert Image", - }, - "|", - { - name: "preview", - action: SimpleMDE.togglePreview, - className: "fa fa-eye no-disable", - title: "Toggle Preview", - }, - { - name: "side-by-side", - action: SimpleMDE.toggleSideBySide, - className: "fa fa-columns no-disable no-mobile", - title: "Toggle Side by Side", - }, - { - name: "fullscreen", - action: SimpleMDE.toggleFullScreen, - className: "fa fa-arrows-alt no-disable no-mobile", - title: "Toggle Fullscreen", - }, - "|", - { - name: "guide", - action: 'https://simplemde.com/markdown-guide', - className: "fa fa-question-circle", - title: "Markdown Guide", - }, - ] - }; + this.state = markdownConfigs; } handleChange(value) { @@ -153,4 +212,7 @@ jQuery.entwine('ss', ($) => { ); } }); -}); \ No newline at end of file +}); + + +export default { MarkdownEditorField }; \ No newline at end of file diff --git a/client/src/components/MarkdownEditorField/MarkdownEmbedModal.js b/client/src/components/MarkdownEditorField/MarkdownEmbedModal.js new file mode 100644 index 0000000..cfa4168 --- /dev/null +++ b/client/src/components/MarkdownEditorField/MarkdownEmbedModal.js @@ -0,0 +1,136 @@ +import i18n from 'i18n'; +import React, { Component, PropTypes } from 'react'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import FormBuilderModal from 'components/FormBuilderModal/FormBuilderModal'; +import * as schemaActions from 'state/schema/SchemaActions'; + +const sectionConfigKey = 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin'; + +class MarkdownEmbedModal extends Component { + + constructor(props) { + super(props); + + //this.handleSubmit = this.handleSubmit.bind(this); + } + + getModalProps() { + + const props = Object.assign( + { + handleSubmit: this.handleSubmit, + onLoadingError: this.handleLoadingError, + showErrorMessage: true, + responseClassBad: 'alert alert-danger', + identifier: 'AssetAdmin.InsertEmbedModal', + }, + this.props, + { + className: `insert-media-modal ${this.props.className}`, + bsSize: 'lg', + handleHide: this.props.onHide, + title: ((this.props.targetUrl) + ? i18n._t('AssetAdmin.EditTitle', 'Media from the web') + : i18n._t('AssetAdmin.CreateTitle', 'Insert new media from the web')), + } + ); + + delete props.onHide; + delete props.sectionConfig; + delete props.onInsert; + delete props.fileAttributes; + + return props; + } + + handleSubmit(data, action) { + switch (action) { + case 'action_addmedia': { + //this.props.onCreate(data); + break; + } + case 'action_insertmedia': { + //this.props.onInsert(data); + break; + } + case 'action_cancel': { + //this.props.onHide(); + break; + } + default: { + // noop + } + } + + return Promise.resolve(); + } + + render() { + return