From ff5c021cd390cb4496612af85f3e76d38e003141 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sun, 27 Aug 2017 14:00:45 +0000 Subject: [PATCH] Cerrando --- .../Grafoscopio/GrafoscopioNotebook.class.st | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index 778260d..619b2e4 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -113,6 +113,19 @@ GrafoscopioNotebook >> copyNodeToClipboard [ self notebookContent: notebook. ] +{ #category : #operation } +GrafoscopioNotebook >> currentNode [ + | currentNode | + currentNode := tree highlightedItem. + currentNode ifNil: [ ^ self ]. + ^ currentNode +] + +{ #category : #operation } +GrafoscopioNotebook >> currentNodeContent [ + ^ self currentNode content +] + { #category : #'editing nodes' } GrafoscopioNotebook >> cutNodeToClipboard [ self copyNodeToClipboard; removeNode. @@ -263,22 +276,14 @@ GrafoscopioNotebook >> header: anObject [ { #category : #operation } GrafoscopioNotebook >> htmlToMarkdown [ - | currentNode nodeContent | - currentNode := tree highlightedItem. - currentNode ifNil: [ ^ self ]. - nodeContent := currentNode content. - nodeContent htmlToMarkdown. - self updateBodyFor: currentNode + self currentNodeContent htmlToMarkdown. + self updateBodyFor: self currentNode ] { #category : #operation } GrafoscopioNotebook >> htmlToMarkdownSubtree [ - | currentNode nodeContent | - currentNode := tree highlightedItem. - currentNode ifNil: [ ^ self ]. - nodeContent := currentNode content. - nodeContent htmlToMarkdownSubtree. - self updateBodyFor: currentNode + self currentNodeContent htmlToMarkdownSubtree. + self updateBodyFor: self currentNode ] { #category : #operation }