Update Blogger and Booklet to use new MDE library

This commit is contained in:
DanyLE
2023-01-04 00:33:08 +01:00
parent de639e6d39
commit 7c161236f3
16 changed files with 38 additions and 32 deletions

View File

@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 9: Update to use the new MDE library
* Patch 8: Support for antOS 2.0.x
* Patch 7: Fix sendmail API security bug
* Patch 6: Chage libraries load order

View File

@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 9: Update to use the new MDE library
* Patch 8: Support for antOS 2.0.x
* Patch 7: Fix sendmail API security bug
* Patch 6: Chage libraries load order

File diff suppressed because one or more lines are too long

View File

@ -6,9 +6,9 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.2.8-a",
"version":"0.2.9-a",
"category":"Internet",
"iconclass":"fa fa-book",
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"mimes":["none"]
}

Binary file not shown.

View File

@ -81,7 +81,7 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BasicDialog
main: () ->
super.main()
@editor = new SimpleMDE
@editor = new EasyMDE
autoDownloadFontAwesome: false
element: @find "contentarea"
status: false
@ -107,14 +107,14 @@ class BloggerCVSectionDiaglog extends this.OS.GUI.BasicDialog
@handle data if @handle
@quit()
@on "vboxchange", () => @resizeContent()
@on "resize", () => @resizeContent()
@resizeContent()
resizeContent: () ->
container = @find "editor-container"
children = ($ container).children()
children = ($ ".EasyMDEContainer", container).children()
cheight = ($ container).height() - 30
($ children[1]).css("height", cheight + "px")
($ children[0]).css("height", cheight + "px")
# this dialog is for send mail

View File

@ -187,7 +187,7 @@ class Blogger extends this.OS.application.BaseApplication
.catch (e) => @error __("Cannot delete the section: {0}", e.toString()), e
return false
@editor = new SimpleMDE
@editor = new EasyMDE
element: @find "markarea"
autoDownloadFontAwesome: false
autofocus: true
@ -237,7 +237,7 @@ class Blogger extends this.OS.application.BaseApplication
className: "fa fa-eye no-disable",
action: (e) =>
@previewOn = !@previewOn
SimpleMDE.togglePreview e
EasyMDE.togglePreview e
#/console.log @select ".editor-preview editor-preview-active"
renderMathInElement @find "editor-container"
},
@ -294,7 +294,7 @@ class Blogger extends this.OS.application.BaseApplication
sel = @tabcontainer.selectedTab
return unless sel and sel.container.aid is "blog-container"
@saveBlog()
@on "vboxchange", () =>
@on "resize", () =>
@resizeContent()
@resizeContent()
@ -489,12 +489,12 @@ class Blogger extends this.OS.application.BaseApplication
resizeContent: () ->
container = @find "editor-container"
children = ($ container).children()
children = ($ ".EasyMDEContainer", container).children()
titlebar = (($ @scheme).find ".afx-window-top")[0]
toolbar = children[1]
statusbar = children[4]
toolbar = children[0]
statusbar = children[3]
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 90
($ children[2]).css("height", cheight + "px")
($ children[1]).css("height", cheight + "px")
Blogger.singleton = true
Blogger.dependencies = [

View File

@ -6,9 +6,9 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.2.8-a",
"version":"0.2.9-a",
"category":"Internet",
"iconclass":"fa fa-book",
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"mimes":["none"]
}