mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-09 13:10:24 +01:00
✨ Updated UI for presets
This commit is contained in:
@@ -47,5 +47,5 @@ class EditorMenuItem: NSMenuItem {
|
||||
}
|
||||
|
||||
class PresetMenuItem: NSMenuItem {
|
||||
var preset: CustomPrefs.Preset?
|
||||
var preset: Preset?
|
||||
}
|
||||
|
||||
@@ -71,4 +71,22 @@ extension String {
|
||||
}
|
||||
}
|
||||
|
||||
var stripped: String {
|
||||
do {
|
||||
guard let data = self.data(using: .unicode) else {
|
||||
return ""
|
||||
}
|
||||
let attributed = try NSAttributedString(
|
||||
data: data,
|
||||
options: [
|
||||
.documentType: NSAttributedString.DocumentType.html,
|
||||
.characterEncoding: String.Encoding.utf8.rawValue],
|
||||
documentAttributes: nil
|
||||
)
|
||||
return attributed.string
|
||||
} catch {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user