replacing the content in slide

Home Forums Open-Xml-Sdk-JavaScript replacing the content in slide

This topic contains 7 replies, has 2 voices, and was last updated by  selvakumar 8 years, 7 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3236

    selvakumar
    Participant

    Hi Eric,
    I am using open xml sdk, To modify the the presentation slides.
    I am facing the issue when replacing the content in the slide.
    cause: when typing the content I use the backspace/shift key means the content will split into multiple tags in slide.xml, how to overcome this problem.

    #3237

    selvakumar
    Participant

    In slide1.xml file I find the following elements.

    Expect:
    -<a:r>
    <a:rPr lang=”en-US” smtClean=”0″/>
    <a:t><<KBF_FIRST>></a:t>
    </a:r>

    but it split into two elements like below:

    <a:rPr lang=”en-US” smtClean=”0″/>
    <a:t><<</a:t>
    </a:r>
    -<a:r>
    <a:rPr lang=”en-US” smtClean=”0″/>
    <a:t>KBF_FIRST>></a:t>
    </a:r>

    #3244

    Eric White
    Keymaster

    Hi,

    What you are seeing is expected behavior. When processing content in slides, your code must take into account that text might be split into multiple runs.

    The same situation exists in WordprocessingML – you must be prepared for a paragraph to contain multiple runs, and you do not know where splits will or will not come.

    This, for instance, presents challenges when attempting to search and replace text. See the screen-casts at the following link, which explains how I address this issue when using a regular expression to search for text, and that text might be split across runs.

    OpenXmlRegex Developer Center

    Cheers, Eric

    #3250

    selvakumar
    Participant

    Thanks Eric..

    #3252

    selvakumar
    Participant

    Hi Eric, I watched the video, you provided the valuable information, I want to convert the openxmlregex.cs C# code to java script code, Can you guide me how to do it.

    #3253

    selvakumar
    Participant

    Hi Eric, I tried to convert the C# code to java script but I am facing more difficulties, If openxmlregexp is available in java script code means,its really help full.

    #3262

    Eric White
    Keymaster

    Hi,

    That module is not available in JavaScript.

    I wrote a blog post on this, because this is a recurring question – how to convert Open-Xml-PowerTools to JavaScript.

    Open-Xml-PowerTools and JavaScript

    Cheers, Eric

    #3265

    selvakumar
    Participant

    Thanks Eric for immediate reply..

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.