How to use the superdesk-core/scripts/apps/authoring/authoring/helpers.stripHtmlRaw function in superdesk-core

To help you get started, we’ve selected a few superdesk-core 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 superdesk / superdesk-planning / client / utils / planning.js View on Github external
const createNewPlanningFromNewsItem = (addNewsItemToPlanning, newsCoverageStatus, desk, user, contentTypes) => {
    const newCoverage = self.createCoverageFromNewsItem(addNewsItemToPlanning, newsCoverageStatus,
        desk, user, contentTypes);

    let newPlanning = {
        type: ITEM_TYPE.PLANNING,
        slugline: addNewsItemToPlanning.slugline,
        headline: get(addNewsItemToPlanning, 'headline'),
        planning_date: moment(),
        ednote: get(addNewsItemToPlanning, 'ednote'),
        subject: get(addNewsItemToPlanning, 'subject'),
        anpa_category: get(addNewsItemToPlanning, 'anpa_category'),
        urgency: get(addNewsItemToPlanning, 'urgency'),
        description_text: stripHtmlRaw(get(addNewsItemToPlanning, 'abstract', '')),
        coverages: [newCoverage],
    };

    if (get(addNewsItemToPlanning, 'flags.marked_for_not_publication')) {
        newPlanning.flags = {marked_for_not_publication: true};
    }

    if (get(addNewsItemToPlanning, 'place.length', 0) > 0) {
        newPlanning.place = addNewsItemToPlanning.place;
    }

    return newPlanning;
};

superdesk-core

![CI](https://github.com/superdesk/superdesk-client-core/workflows/CI/badge.svg) [![Code Climate](https://codeclimate.com/github/superdesk/superdesk-client-core/badges/gpa.svg)](https://codeclimate.com/github/superdesk/superdesk-client-core)

AGPL-3.0
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Similar packages