How to export structured notes (image + text) from a Next.js app to Apple Notes?

I’m developing a Next.js application where users can take notes on pictures, and I’m looking for a way to allow users to export these notes (structured as image + text pairs) directly to Apple Notes. So far, I’ve tried several approaches, but none seem ideal. I’m hoping someone can suggest better solutions or improvements.

Question:

Has anyone encountered a similar situation or found a better way to export structured data (like image + text) to Apple Notes from a web app? Are there any workarounds or other APIs that might support this kind of integration?

Any guidance or suggestions would be greatly appreciated!

Here are the options I’ve tried so far:

Copy and Paste:

I copy the information (text + image) to the user’s clipboard. They can manually paste this into Apple Notes.

Issue: This solution is not very user-friendly and requires manual intervention.

URL Scheme (Only works for text):

iPhone: mobilenotes://add?title=My%20Note%20Title&content=This%20is%20the%20body%20of%20the%20note%20on%20iOS

Mac: notes://add?title=My%20Mac%20Note%20Title&content=This%20is%20the%20body%20of%20the%20note%20on%20macOS

Issue: This only allows text export; images cannot be included using this approach.

Using the Share API:

This allows the user to select Apple Notes as the app where the content will be saved. It works well but has limitations.

Issue: The Share API can only handle a structure like: one title, one text block and then the images in a combination (but not text – image, text – image blocks … etc.

1

I think you can generate your note using markdown format (notion, apple notes etc support it) and then you can use the share api to open the file using notes

1

Using Navigator: clipboard

It is possible to save html to the clipboard.

  1. Format the notes in a structured html
  2. Create a button with a click event
  3. In this click event use the structured html and navigator.clipboard.write to save the html into the users clipboard
  4. The User will now be able to paste the content into their notes and they will be formatted perfectly.

Small Code Example

    // first create the clipboard item - use .then to fetch the data because otherwise it will not work on ios
    const clipboardItem = new ClipboardItem({
        'text/html': getYourContent().then((htmlContent) => {
            return new Blob([htmlContent], { type: 'text/html' });
        }),
    });

    navigator.clipboard.write([clipboardItem]);


    const getYourContent = () => {
        // fetch content if you really use this
        // small html example:
        const htmlContent = `
              <h1>Header</h1>
              <p>$paragraph</p>
              <br/>
              <img src="https:/picture.com" />
        `;
        
        return htmlContent
    }

On macOS, you could create RTFD bundles.

Rich Text Format Directory (RTFD) bundles, such as those created by TextEdit rich text documents with images, can be imported into Apple Notes on macOS with formatting and images preserved. The bundle is essentially a directory with a standard Rich Text Format (.rtf) file, along with attachments (such as images).

If you can package and allow downloading content from your application as RTFD bundles, they can be easily imported by the user, by just opening them in Apple Notes. I would suggest creating a rich text document in TextEdit (on macOS) and adding images, then opening the resulting RTFD bundle in Apple Notes. If this solution works for you, you can inspect the underlying file structure of the bundle to see how you can make an export of your application data that matches the RTFD bundle structure.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật