Skill · OpenAI Help Center - Working with writing blocks and code blocks in ChatGPT
Edit Documents Instantly with Writing & Code Blocks
Photo: Jonathan Kemper on Unsplash
Writing blocks are editable areas for draft text, such as emails, messages, social posts, and documents. Instead of copying content back and forth, code blocks keep code and supported preview content separate from the rest of the response, making it easier to read, edit, copy, preview, or run. This isolated panel workspace lets you refine AI-generated content directly without cluttering your conversation.
When ChatGPT creates text that you are likely to revise or reuse, it may place the draft in a writing block. You can also ask ChatGPT to create a draft that you can edit directly in the conversation. Writing blocks appear as dedicated panels in your chat interface, automatically triggered when you request content like emails, reports, or social media posts.
To use writing blocks, select the block and edit the text directly, copy the text, or ask ChatGPT to revise selected text or the entire draft. You can open the block in a full-screen editing view or undo or redo recent AI-assisted edits. For professional workflows, you can save your document to the Library, and the experience adds a wider document layout, cleaner titles, a table of contents for long documents, download support, undo and redo fixes, improved save behavior, and clearer loading states.
ChatGPT usually places code in a code block. A code block keeps the code separate from the rest of the response so that you can read, copy, edit, preview, or run it more easily. You can edit supported code blocks directly, ask ChatGPT to edit the code, or open supported code blocks in full screen. For developers, you can switch between Code and Preview for supported previews or run supported Python code and view console output.
Practical example: You're drafting a client proposal email. Request "Draft a professional proposal email for the Q3 marketing initiative." ChatGPT places it in a writing block. You directly refine the tone, add specific metrics, and ask ChatGPT to expand the call-to-action section-all without leaving the isolated editor panel. When satisfied, save to Library for future templates.
Sources & credits
Original source: OpenAI Help Center - Working with writing blocks and code blocks in ChatGPT