Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support for custom content controls in DocumentAssembler #66

Open
IvanDrag0 opened this issue Jun 30, 2023 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed Word Word related tasks

Comments

@IvanDrag0
Copy link

Currently, Clippit is capable of performing a number of actions using DocumentAssembler based on the text found in the content controls (Repeat, Table, Image, etc.). While those actions are very encompassing, would it be possible to add a way to either generate custom/additional actions (based on code) or a way to designate a specific word as a "miscellaneous" control that Clippit can read.

For example, instead of using the control to add pre-generated images, I want to be able to add images/diagrams on the fly using something like PlantUML:

Word:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est.

<Custom PlantUML="./Root/Diagram">

Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem.

XML:

<?xml version="1.0"?>
<Root>
    <Diagram>
        @startuml
        Bob -> Alice : hello
        @enduml
    </Diagram>
</Root>

Result:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est.

image

Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem.

That would probably also mean that the DocumentAssembler class would need a way to pass those custom functions and/or definitions (such as DocumentAssembler.AddCustom(funcName(), var value)) or a way to specify the code in the document/xml file.

@sergey-tihon sergey-tihon added enhancement New feature or request help wanted Extra attention is needed Word Word related tasks labels Jul 16, 2023
@sergey-tihon
Copy link
Owner

would it be possible to add a way to either generate custom/additional actions (based on code) or a way to designate a specific word as a "miscellaneous" control that Clippit can read.

yes, if you are ready to work on it: propose a design, implementation, tests, and samples/docs.

I did a Markdown to PowerPoint slide generator in the past. When if insert the link, image or object (more complicated than text with formatting) you have to add new parts inside the package, add/update relationships between parts and generate unique rIds.

In general case, these custom/additional actions should has write access to the package and know how to update it correctly. At first sight, such an extensibility model looks complicated and fragile (at least for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Word Word related tasks
Projects
None yet
Development

No branches or pull requests

2 participants