{ "id": "82118", "key": "TIMOB-6950", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2011-10-29T15:51:01.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-18T22:52:39.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h2. Request\r\n\r\nWould be useful if {{Ti.UI.Clipboard}} supported copy/paste of HTML.\r\n\r\nThere is a tutorial [here|http://mcmurrym.wordpress.com/2010/08/13/pasting-simplehtml-into-the-mail-app-ios/] on how to do it.\r\n\r\nh2. Usecase\r\n\r\nLet's say I'm building a scrapbook app where people can save various memories, text, pictures. I want them to be able to save part of emails/webpages, etc... The problem now is that Titanium doesn't support HTML in the clipboard, so it's pasted as plain text. The user want to save the whole part of an email/website, not just the text, but the formatting too.\r\n\r\n\r\nThe following methods would solve this:\r\n{code}\r\n.getHTML()\r\n.setHTML()\r\n.hasHTML()\r\n{code}\r\n\r\nh2. Test case\r\n\r\nTestcase for when it's implemented:\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar c = Ti.UI.Clipboard;\r\n\r\nc.setHTML('test');\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar webView = Ti.UI.createWebView({\r\n\thtml: c.hasHTML() ? c.getHTML() : c.getText()\r\n});\r\n\r\nwin.add(webView);\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Ti API: UI - clipboard support for HTML", "creator": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "subtasks": [], "reporter": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "environment": "* Titanium Mobile 1.7.3", "comment": { "comments": [ { "id": "170843", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please provide a usecase of how this would be used in an application.", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-30T03:33:10.000+0000", "updated": "2011-10-30T03:33:10.000+0000" }, { "id": "170854", "author": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "body": "Added required usecase to the ticket description.", "updateAuthor": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "created": "2011-10-30T07:35:43.000+0000", "updated": "2011-10-30T07:35:43.000+0000" }, { "id": "177752", "author": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "body": "Can someone reopen this?", "updateAuthor": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "created": "2012-01-02T05:36:24.000+0000", "updated": "2012-01-02T05:36:24.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }