You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,8 @@ inlineMarkdownEditor({
46
46
defaultMarkdown:function(markdown) {}, // a markdown parser
47
47
buildSectionForm:function() {}, // return a string containing the form element
48
48
onComplete:function(response, markdown, html, el, uniqueId, form, o) {}, // run on completing AJAX post
49
-
isEditable:function(markdown) {} // returns boolean; whether a given subsection should get an inline form; default skips HTML and horizontal rules
49
+
isEditable:function(markdown) {}, // returns boolean; whether a given subsection should get an inline form; default skips HTML and horizontal rules
50
+
extraButtons: { 'fa-icon-name':function(element) {} } // object with keys of icon names for additional buttons with associated actions for each; returns jQuery element upon construction
50
51
51
52
});
52
53
```
@@ -68,6 +69,7 @@ Tests are set up with Jasmine, and can be run with `npm test`.
68
69
## Goals
69
70
70
71
* configurable editors
72
+
* plan for swappable editors; will need to specify both constructor and onEditorSubmit in processSection
@@ -10290,7 +10306,7 @@ module.exports = function onComplete(response, markdown, html, el, uniqueId, for
10290
10306
// replace the section but reset our html and markdown
10291
10307
html=o.defaultMarkdown(markdown);
10292
10308
el.html(html);
10293
-
o.insertEditLink(uniqueId,el,form);
10309
+
o.insertEditLink(uniqueId,el,form,false,false,o);
10294
10310
if(o.postProcessor)o.postProcessor(el);// add #hashtag and @callout links, extra CSS and deep links
10295
10311
}else{
10296
10312
message.html('<b style="color:#a33">There was an error</b> -- the wiki page may have changed while you were editing; save your content in the clipboard and try refreshing the page.');
@@ -10327,7 +10343,8 @@ module.exports = function processSection(markdown, o) {
Copy file name to clipboardExpand all lines: src/onComplete.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ module.exports = function onComplete(response, markdown, html, el, uniqueId, for
8
8
// replace the section but reset our html and markdown
9
9
html=o.defaultMarkdown(markdown);
10
10
el.html(html);
11
-
o.insertEditLink(uniqueId,el,form);
11
+
o.insertEditLink(uniqueId,el,form,false,false,o);
12
12
if(o.postProcessor)o.postProcessor(el);// add #hashtag and @callout links, extra CSS and deep links
13
13
}else{
14
14
message.html('<b style="color:#a33">There was an error</b> -- the wiki page may have changed while you were editing; save your content in the clipboard and try refreshing the page.');
0 commit comments