How to use the @deckdeckgo/deck-utils.cleanContent function in @deckdeckgo/deck-utils

To help you get started, we’ve selected a few @deckdeckgo/deck-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deckgo / deckdeckgo / studio / src / app / handlers / editor / events / deck / deck-events.handler.tsx View on Github external
return new Promise(async (resolve) => {
            const content: string = await this.filterSlideContentSlots(slide);

            if (!content || content.length <= 0) {
                resolve(content);
                return;
            }

            let result: string = await cleanContent(content);

            if (!slide.hasAttribute('custom-background')) {
                result = result.replace(/<div slot="background">(.*?)&lt;\/div&gt;/g, '');
            }

            resolve(result);
        });
    }</div>
github deckgo / deckdeckgo / remote / src / app / utils / parse-slides.utils.tsx View on Github external
return new Promise(async (resolve) =&gt; {
            if (!slide || !slide.content || slide.content === undefined || slide.content === '')  {
                resolve(undefined);
                return;
            }

            let result: string = await cleanContent(slide.content);

            const customBackground: boolean = await this.hasCustomBackground(slide);

            if (!customBackground) {
                result = result.replace(/<div slot="background">(.*?)&lt;\/div&gt;/g, '');
            }

            result = result.replace(/<a slot="actions">/g, '');
            result = result.replace(//g, '');

            resolve(result);
        });
    }</a></div>

@deckdeckgo/deck-utils

Utils for the DeckDeckGo presentations

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis