Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
ember-simplemde
Advanced tools
A wrapper around the SimpleMDE editor for use in ember-cli projects, it provides a component simple-mde
to show the editor, and a helper to show the rendered html simple-mde-preview
you can check this on the dummy app application template.
Install with ember install ember-simplemde
Use the component with:
// Controller
theValue: "This is a test of **simpleMDE**"
{{simple-mde value=theValue change=(action (mut theValue))}}
Use the helper like this:
{{simple-mde-preview theValue}}
ember-simplemde supports all options that SimpleMDE supports.
full list of all simpleMde options
You can pass options through to the simpleMDE instance in two ways.
You can pass global options that will be applied to all editors via the consuming apps config/environment
with a property called simpleMDE
. For example, if you wanted to remove the toolbar from all instances:
module.exports = function(environment) {
var ENV = {
...
simpleMDE: {
toolbar: false,
... any simpleMDE options go here
},
...
};
Note on toolbar options action handlers: If you are customizing the simpleMDE toolbar options from the consuming apps config, simpleMDE needs you to pass toolbar option action handlers as function references. In ember configs, we can only express these function references as strings. Ember-simplemde has a mechanism in place to unpack these strings as function references against the window.SimpleMDE global. So, if you are expressing a custom toolbar option from your consuming apps config, pass the toolbar action handlers as strings. If you are passing options to the instance and not using your ember/config you can use function reference's/definitions like normal.
For example, the action handler below will be unpacked against the window as
window['SimpleMDE']['toggleBold']
module.exports = function(environment) {
var ENV = {
...
simpleMDE: {
toolbar: [
{
name: 'bold',
action: 'SimpleMDE.toggleBold',
className: 'fa fa-bold',
title: 'Bold'
}
]
},
...
};
You can pass instance options via the simple-mde components options
attribute. The options attribute will overwrite global options via ember.assign
so if you want instance options to squash global options you can use this. An example of this is in the tests/dummy/app/application.hbs
and the corresponding application controller.
{{simple-mde value=value options=simpleMdeOptions}}
Note: This options parameter is NOT watched. Changing it during runtime will not change the instance properties.
git clone https://github.com/smith-carson/ember-simplemde.git
cd ember-simplemde
npm install
bower install
ember serve
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://ember-cli.com/.
FAQs
A component wrapper for SimpleMDE markdown editor
The npm package ember-simplemde receives a total of 186 weekly downloads. As such, ember-simplemde popularity was classified as not popular.
We found that ember-simplemde demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.