Skip to content

Commit

Permalink
Merge 558b40b into a13c6da
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-schilling committed Jun 28, 2020
2 parents a13c6da + 558b40b commit cd36996
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ export
convertToHTML

| blocks htmlConverter html |
Transcript open.
self textMorph accept.
htmlConverter := MarkdownHtmlConverter new.
blocks := self blockTextStyler parse: self textMorph getText asString.
html := htmlConverter convert: blocks with: self blockTextStyler styleSettings.

Transcript show: html
MarkdownHtmlExportView openWith: html.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"buildEditorMenuBarWith:" : "MK 6/21/2020 18:01",
"buildEditorTextMorphWith:" : "azi 6/1/2020 15:57",
"buildWith:" : "azi 6/12/2020 01:28",
"convertToHTML" : "hsl 6/27/2020 14:48",
"convertToHTML" : "mas 6/28/2020 13:08",
"createNewInstance" : "MK 6/21/2020 17:51",
"markdownText" : "lpf 6/13/2019 15:26",
"markdownText:" : "azi 6/1/2020 17:33",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
openWith: aHtmlString

^ self new
initializeWithLabel: 'Markdown Editor - HTML Export';
initializeContentWith: aHtmlString;
openInWorld;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
initializeContentWith: aHtmlString

self addMorph: (PluggableTextMorph new setText: aHtmlString) frame: (0@0 corner: 1@1).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
"openWith:" : "mas 6/28/2020 13:30" },
"instance" : {
"initializeContentWith:" : "mas 6/28/2020 13:10" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "MarkdownEditor-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "MarkdownHtmlExportView",
"pools" : [
],
"super" : "SystemWindow",
"type" : "normal" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
as yet unclassified
testCreateMarkdownHtmlExportView

| exportView pluggableTextMorphs |

exportView := MarkdownHtmlExportView openWith: '<!DOCTYPE html><html>Some HTML</html>'.
pluggableTextMorphs := exportView submorphs select: [:morph | morph isKindOf: PluggableTextMorph].
exportView abandon.

self assert: pluggableTextMorphs size = 1.
self assert: pluggableTextMorphs first text = '<!DOCTYPE html><html>Some HTML</html>'.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
},
"instance" : {
"testCreateMarkdownHtmlExportView" : "mas 6/28/2020 13:34" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "MarkdownEditor-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "MarkdownHtmlExportViewTest",
"pools" : [
],
"super" : "TestCase",
"type" : "normal" }

0 comments on commit cd36996

Please sign in to comment.