import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { createSubscribedElement } from '../../UnstatedUtils'; import { tags, attrs } from '../../../../../lib/service/xss/recommended-whitelist'; import AppContainer from '../../../services/AppContainer'; import MarkDownSettingContainer from '../../../services/MarkDownSettingContainer'; class WhiteListInput extends React.Component { renderRecommendTagBtn() { const { t, markDownSettingContainer } = this.props; return (
); } renderRecommendAttrBtn() { const { t, markDownSettingContainer } = this.props; return ( ); } renderTagValue() { const { customizable, markDownSettingContainer } = this.props; if (customizable) { return markDownSettingContainer.state.tagWhiteList; } return tags; } renderAttrValue() { const { customizable, markDownSettingContainer } = this.props; if (customizable) { return markDownSettingContainer.state.attrWhiteList; } return attrs; } render() { const { t, customizable, markDownSettingContainer } = this.props; return ( <>