diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index 7aafee18..05c92451 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -147,7 +147,29 @@ export default { } return ret; - }, /////////////////////////////// + }, + /////////////////////////////// + // Splice a string + //changes the content of a string by removing a range of + // characters and/or adding new characters. + // + // @param {String} source string + // @param {number} start Index at which to start changing the string. + // @param {number} delCount An integer indicating the number of old chars to remove. + // @param {string} newSubStr The String that is spliced in. + // @return {string} A new string with the spliced substring. + stringSplice: function(source, start, delCount, newSubStr) { + if (source == null || source == "") { + return ""; + } + return ( + source.slice(0, start) + + newSubStr + + this.slice(start + Math.abs(delCount)) + ); + }, + + /////////////////////////////// // ICON FOR *ALL* OBJECT TYPES //(used for search results and event log / history) //NOTE: Any object type could appear in event log, they all need to be supported where possible diff --git a/ayanova/src/components/wiki-control.vue b/ayanova/src/components/wiki-control.vue index bee1eaaa..6ec002ba 100644 --- a/ayanova/src/components/wiki-control.vue +++ b/ayanova/src/components/wiki-control.vue @@ -42,7 +42,9 @@
- fa-bold + + fa-bold fa-italic fa-strikethrough fa-heading @@ -62,6 +64,7 @@ fa-square-full