How to Choose Between Linked and Embedded Modes When Creating an OE Document
When a client developer calls OH_ContentEmbed_CreateDocumentByFile to create an OE document, the developer can set the isLinking parameter based on whether source file changes need to be synchronized.
- When isLinking is true, the OE document is created in linked mode. When the server edits the OE document, the source file is also modified. If the source file is moved, deleted, or renamed, starting editing for the OE document will fail. If the user restores the original source file in File Manager, the application must request authorization. Linked mode does not support linking to the sandbox directory of the client application.
- When isLinking is false, the OE document is created in embedded mode. When the client requests the server to edit the OE document, a temporary file is first copied to the sandbox directory of the client application. Server-side modifications to the OE document do not modify the source file. The created temporary file is cleared when the client exits normally.