Working with Copy-Paste in JSON Rich Text Editor
This guide provides clear guidelines on the acceptable practices for copying and pasting content into Contentstack’s JSON RTE. Maintaining consistency and preventing formatting issues are essential to delivering high-quality content. This documentation outlines best practices, limitations, and recommended workflows to help users avoid formatting challenges and align with design expectations.
Best Practices for Pasting Content into JSON RTE
To minimize formatting issues and ensure a smooth content creation experience, follow these recommended practices.
- Preferred Editor: We recommend using Google Docs as the primary source, as it ensures better compatibility with the JSON RTE. Copying from other sources or websites may introduce inconsistencies, requiring manual fixes.
- Review and Edit After Pasting: Inspect the content after pasting to ensure that elements like bullet points, lists, or smart chips render correctly. Make any necessary adjustments immediately to avoid issues during final publishing.
- Test Complex Elements Frequently: If your content includes complex structures (e.g., nested lists or special chips), render the content on the front-end to detect and resolve any visual inconsistencies early.
- Avoid Unsupported Elements: Refer to the list of supported elements below and avoid unsupported features to prevent data loss or misrendering.
Supported Content Formatting When Pasting from Google Docs
The table below outlines the content formatting elements that are supported, partially supported, or not supported when pasted from Google Docs into the JSON RTE.
Group | Formatting | Pasted from Google Docs |
---|---|---|
Font | Font color | Yes (Can be disabled via stack settings) |
Font size | Yes (Can be disabled via stack settings) | |
Underline | Yes | |
Strikethrough | Yes | |
Superscript | Yes | |
Subscript | Yes | |
Paragraph | Alignment | Yes |
Indentation left | Yes | |
Indentation right | Yes | |
Spacing before | No | |
Spacing after | No | |
Line spacing | No | |
Tabs | Alignment | No |
Table Borders and Shading | Border Color | No |
Background Color | No | |
Bullet points and Numbering | General | Yes |
Nested Lists | Yes | |
Checkbox | No | |
Horizontal Line | General | Yes |
Emojis | General | Yes |
Smart Chips | Date, People, Voting Chip, StopWatch, Timer, Variables | Yes (Pasted as normal text) |
File, Calendar Events, Place | Yes (Pasted as links) | |
Special Characters | General | Yes |
Managing Limitations
While the JSON RTE offers flexibility, users may encounter formatting issues when pasting content from unsupported sources. Follow these steps to manage limitations effectively:
- Loss of Advanced Formatting: Some advanced features (e.g., borders, advanced styling) may not be retained when pasted.
- Manual Adjustments May Be Required: Users might need to correct visual inconsistencies by manually editing the content after pasting.
- Unsupported Elements as Plain Text: Elements not supported by JSON RTE will appear as plain text or links, and formatting may be lost.
By following these recommendations, you can maintain high-quality content and minimize disruptions caused by formatting inconsistencies.