mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Merge pull request #158 from writeas/implement-undo-in-editor
Enable undo in MacEditorTextView
This commit is contained in:
commit
ea529c9f6a
@ -1,20 +1,22 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf2571
|
{\rtf1\ansi\ansicpg1252\cocoartf2578
|
||||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 SFProDisplay-Regular;}
|
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 SFProDisplay-Regular;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
{\*\expandedcolortbl;;}
|
{\*\expandedcolortbl;;}
|
||||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
||||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
||||||
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\f0\fs26 \cf0 This application makes use of the following open-source projects:\
|
\f0\fs26 \cf0 This application makes use of the following open-source projects:\
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
\
|
||||||
\cf0 \
|
|
||||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0
|
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0\cf0 {\listtext \uc0\u8226 }Lora typeface\
|
\ls1\ilvl0\cf0 {\listtext \uc0\u8226 }Lora typeface\
|
||||||
{\listtext \uc0\u8226 }Open Sans typeface\
|
{\listtext \uc0\u8226 }Open Sans typeface\
|
||||||
{\listtext \uc0\u8226 }Hack typeface\
|
{\listtext \uc0\u8226 }Hack typeface\
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
||||||
\cf0 \
|
\cf0 \
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
|
||||||
{\field{\*\fldinst{HYPERLINK "https://github.com/writeas/writefreely-swiftui-multiplatform/tree/main/Shared/Resources/Licenses"}}{\fldrslt \cf0 View the licenses}}}
|
{\field{\*\fldinst{HYPERLINK "https://github.com/writeas/writefreely-swiftui-multiplatform/tree/main/Shared/Resources/Licenses"}}{\fldrslt \cf0 View the licenses}}\
|
||||||
|
\
|
||||||
|
The post editor is based on Thiago Holanda's {\field{\*\fldinst{HYPERLINK "https://gist.github.com/unnamedd/6e8c3fbc806b8deb60fa65d6b9affab0"}}{\fldrslt MacEditorTextView}} gist.\
|
||||||
|
}
|
@ -157,6 +157,7 @@ final class CustomTextView: NSView {
|
|||||||
)
|
)
|
||||||
textView.minSize = NSSize(width: 0, height: contentSize.height)
|
textView.minSize = NSSize(width: 0, height: contentSize.height)
|
||||||
textView.textColor = NSColor.labelColor
|
textView.textColor = NSColor.labelColor
|
||||||
|
textView.allowsUndo = true
|
||||||
|
|
||||||
return textView
|
return textView
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user