mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
New site setting to enable or disable rich text pasting
This commit is contained in:
parent
0a47642003
commit
b9c0488687
@ -434,9 +434,14 @@ export default Ember.Component.extend({
|
||||
});
|
||||
|
||||
$element.on('fileuploadpaste', (e) => {
|
||||
const { types } = clipboardData(e);
|
||||
this._pasted = true;
|
||||
|
||||
if (!this.siteSettings.enable_rich_text_paste || !$(".d-editor-input").is(":focus")) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { types } = clipboardData(e);
|
||||
|
||||
if (types.includes("text/plain") || types.includes("text/html")) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ export default Ember.Component.extend({
|
||||
},
|
||||
|
||||
paste(e) {
|
||||
if (!$(".d-editor-input").is(":focus")) {
|
||||
if (!this.siteSettings.enable_rich_text_paste || !$(".d-editor-input").is(":focus")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1088,6 +1088,7 @@ en:
|
||||
top_page_default_timeframe: "Default timeframe for the top view page."
|
||||
show_email_on_profile: "Show a user's email on their profile (only visible to themselves and staff)"
|
||||
prioritize_username_in_ux: "Show username first on user page, user card and posts (when disabled name is shown first)"
|
||||
enable_rich_text_paste: "Enable automatic HTML to Markdown conversion"
|
||||
|
||||
email_token_valid_hours: "Forgot password / activate account tokens are valid for (n) hours."
|
||||
|
||||
|
@ -525,6 +525,9 @@ posting:
|
||||
enable_markdown_typographer:
|
||||
client: true
|
||||
default: true
|
||||
enable_rich_text_paste:
|
||||
client: true
|
||||
default: false
|
||||
suppress_reply_directly_below:
|
||||
client: true
|
||||
default: true
|
||||
|
Loading…
Reference in New Issue
Block a user