From b2c8d2bfdf7599ebea77b758ec61c8cb672ca526 Mon Sep 17 00:00:00 2001 From: Gloria Meneses Date: Sat, 26 Aug 2017 21:07:56 +0000 Subject: [PATCH] Adding the htmlToMarkdownSubtree to the ui --- .../Grafoscopio/GrafoscopioNotebook.class.st | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index 0e2ecc2..778260d 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -271,6 +271,16 @@ GrafoscopioNotebook >> htmlToMarkdown [ self updateBodyFor: currentNode ] +{ #category : #operation } +GrafoscopioNotebook >> htmlToMarkdownSubtree [ + | currentNode nodeContent | + currentNode := tree highlightedItem. + currentNode ifNil: [ ^ self ]. + nodeContent := currentNode content. + nodeContent htmlToMarkdownSubtree. + self updateBodyFor: currentNode +] + { #category : #operation } GrafoscopioNotebook >> importLinkContent [ "I see if a node header is an url located at 'http://ws.stfx.eu', wich means that is a shared @@ -846,6 +856,13 @@ GrafoscopioNotebook >> topBar [ description: 'HTML to Markdown'; icon: #smallProfile asIcon; action: [ self htmlToMarkdown ] ]. + group + addItem: [ :item | + item + name: nil; + description: 'HTML to Markdown subtree'; + icon: #hierarchy asIcon; + action: [ self htmlToMarkdownSubtree ] ]. group addItem: [ :item | item