Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
stub: '',
status: 0,
sticky: false,
language: 0,
thumbnail: ''
},
postStatus: Object.keys(params.blog.status).map(
k => params.blog.status[k]
),
blogCategories: Object.keys(params.blog.categories).map(
k => params.blog.categories[k]
),
languages: Object.keys(params.global.languages).map(
k => params.global.languages[k]
),
mdeState: RichTextEditor.createEmptyValue()
};
}
constructor(props: RequestAppealStatementProps) {
super(props);
this.state = {
summaryValue: "",
detailsValue: RichTextEditor.createEmptyValue(),
};
}
function PostForm({ post, onSubmit }) {
const [localPost, setLocalPost] = useState(post);
const [mdeState, setMdeState] = useState(
post.id > 0
? RichTextEditor.createValueFromString(post.content, 'markdown')
: RichTextEditor.createEmptyValue()
);
const { formatMessage: f } = useIntl();
const handleMdeChange = value => {
let post = { ...localPost };
post['content'] = value.toString('markdown');
setLocalPost(post);
setMdeState(value);
};
const handleOnChange = event => {
let post = { ...localPost };
post[event.target.name] = event.target.value;
if (event.target.name === 'title') {
post.stub = slugify(event.target.value);
constructor (props) {
super(props)
if (props.defaultValue) {
const value = RichTextEditor.createValueFromString(props.defaultValue, 'html')
this.state = { value }
} else {
const value = RichTextEditor.createEmptyValue()
this.state = { value }
}
this.focus = () => this[props.name].focus()
this.onChange = (value) => {
this.setState({ value })
this.props.onChange(value.toString('html'))
}
}
show() {
super.show({description: RichTextEditor.createEmptyValue()});
}
show() {
super.show({
title: '',
description: RichTextEditor.createEmptyValue(),
size: 1,
blocked: ''
});
}
constructor(props: RequestAppealModalProps) {
super(props);
this.state = {
summaryValue: "",
citeConstitutionValue: RichTextEditor.createEmptyValue(),
detailsValue: RichTextEditor.createEmptyValue(),
};
}