diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js
index 73135bb87..e17bfa196 100644
--- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js
+++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocumentPage.js
@@ -1,6 +1,6 @@
function newSuperalgosDocsDocumentPage() {
let thisObject = {
- docsSchemaDocument: undefined,
+ docsSchemaDocument: undefined,
exitEditMode: exitEditMode,
render: render,
initialize: initialize,
@@ -162,32 +162,36 @@ function newSuperalgosDocsDocumentPage() {
addImages()
function addDefinitionTable(docsSchemaDocument, idPrefix, category, project, type) {
- if (docsSchemaDocument.definition !== undefined) {
-
- let definitionText = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
- definitionText = definitionText + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(docsSchemaDocument.definition)
-
- /* We will test if we can draw an image here or not*/
- let testElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(project, type)
-
- if ((category === 'Topic' || category === 'Concept') && testElement === undefined) {
- HTML = HTML + '
Summary: ' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
'
- } else {
- HTML = HTML + ''
-
- let imageItem = {
- div: 'definition-image-div-' + definitionImagesArray.length,
- project: project,
- category: category,
- type: type
- }
- definitionImagesArray.push(imageItem)
-
- HTML = HTML + '
'
- HTML = HTML + '
' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
'
- HTML = HTML + '
'
+ if (docsSchemaDocument.definition === undefined) {
+ docsSchemaDocument.definition = {
+ text: "Right click to edit this text and replace it with a definition / summary for this page. ESC to exit edit mode."
}
}
+
+ let definitionText = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(docsSchemaDocument.definition)
+ definitionText = definitionText + UI.projects.superalgos.utilities.docs.addWarningIfTranslationIsOutdated(docsSchemaDocument.definition)
+
+ /* We will test if we can draw an image here or not*/
+ let testElement = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType(project, type)
+
+ if ((category === 'Topic' || category === 'Concept') && testElement === undefined) {
+ HTML = HTML + 'Summary: ' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
'
+ } else {
+ HTML = HTML + ''
+
+ let imageItem = {
+ div: 'definition-image-div-' + definitionImagesArray.length,
+ project: project,
+ category: category,
+ type: type
+ }
+ definitionImagesArray.push(imageItem)
+
+ HTML = HTML + '
'
+ HTML = HTML + '
' + UI.projects.superalgos.utilities.docs.addToolTips(definitionText, UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type) + '
'
+ HTML = HTML + '
'
+ }
+
}
function buildOrderedTopicPageIndex() {