Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initialiseMedium ({ api, page, el, meta }) {
const strings = api.translations.sync.strings()
const draft = api.drafts.sync.get(DRAFT_LOCATION) || {}
var editor = new MediumEditor(el, {
placeholder: {
text: draft.body ? '' : strings.blogNew.actions.writeBlog
},
elementsContainer: page,
// autoLink: true,
buttonLabels: 'fontawesome',
imageDragging: true,
toolbar: {
allowMultiParagraphSelection: true,
buttons: [
'bold',
'italic',
'anchor',
{
name: 'h2',
contentFA: '<i class="fa fa-header">',</i>
setTimeout(() => {
if (this.descriptionMediumEditor) this.descriptionMediumEditor.destroy();
this.descriptionMediumEditor = new MediumEditor('#editListingDescription', {
placeholder: {
text: '',
},
toolbar: {
buttons: ['bold', 'italic', 'underline', 'anchor', 'unorderedlist', 'orderedlist'],
},
});
if (!this.rendered) {
this.rendered = true;
this.$titleInput.focus();
}
});