@seafile/sdoc-editor 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,8 +56,7 @@ export const renderHeader = (props, editor) => {
56
56
  fontStyle: 'italic'
57
57
  });
58
58
  let isShowPlaceHolder = false;
59
- const firstChild = editor.children[0];
60
- if (firstChild.id === element.id && Node.string(element) === '' && !isComposing) {
59
+ if (Node.string(element) === '' && !isComposing) {
61
60
  isShowPlaceHolder = true;
62
61
  }
63
62
  return /*#__PURE__*/React.createElement("div", Object.assign({
@@ -69,6 +68,7 @@ export const renderHeader = (props, editor) => {
69
68
  position: isShowPlaceHolder ? 'relative' : ''
70
69
  }, style)
71
70
  }), isShowPlaceHolder && /*#__PURE__*/React.createElement(Placeholder, {
72
- title: 'Please_enter_title'
71
+ title: 'Header',
72
+ top: 0
73
73
  }), children);
74
74
  };
@@ -21,8 +21,8 @@ import QuickInsertPlugin from './quick-insert';
21
21
  import WikiLinkPlugin from './wiki-link';
22
22
  import SeaTableColumnPlugin from './seatable-column';
23
23
  import SeaTableViewsPlugin from './seatable-tables';
24
- const Plugins = [MarkDownPlugin, HtmlPlugin, HeaderPlugin, LinkPlugin, BlockquotePlugin, ListPlugin, CheckListPlugin, CodeBlockPlugin, ImagePlugin, TablePlugin, TextPlugin, TextAlignPlugin, FontPlugin, SdocLinkPlugin, ParagraphPlugin, FileLinkPlugin, CalloutPlugin, SearchReplacePlugin];
25
- const WikiPlugins = [...Plugins, QuickInsertPlugin, WikiLinkPlugin];
24
+ const Plugins = [MarkDownPlugin, HtmlPlugin, HeaderPlugin, LinkPlugin, BlockquotePlugin, ListPlugin, CheckListPlugin, CodeBlockPlugin, ImagePlugin, TablePlugin, TextPlugin, TextAlignPlugin, FontPlugin, SdocLinkPlugin, ParagraphPlugin, FileLinkPlugin, CalloutPlugin, SearchReplacePlugin, QuickInsertPlugin];
25
+ const WikiPlugins = [...Plugins, WikiLinkPlugin];
26
26
  const CommentPlugins = [MarkDownPlugin, HtmlPlugin, ParagraphPlugin, TextPlugin, ListPlugin, ImagePlugin, LinkPlugin, MentionPlugin, BlockquotePlugin];
27
27
  export default Plugins;
28
28
  export { MarkDownPlugin, HeaderPlugin, LinkPlugin, BlockquotePlugin, ListPlugin, CheckListPlugin, CodeBlockPlugin, ImagePlugin, TablePlugin, TextPlugin, HtmlPlugin, TextAlignPlugin, FontPlugin, SdocLinkPlugin, ParagraphPlugin, FileLinkPlugin, CalloutPlugin, SearchReplacePlugin, MentionPlugin, QuickInsertPlugin, CommentPlugins, WikiPlugins, WikiLinkPlugin, SeaTableColumnPlugin, SeaTableViewsPlugin };
@@ -5,7 +5,7 @@ import { ReactEditor, useSelected, useSlateStatic } from '@seafile/slate-react';
5
5
  import { Placeholder } from '../../core';
6
6
  import { isEmptyNode } from './helper';
7
7
  import { COMMENT_EDITOR, WIKI_EDITOR } from '../../../constants';
8
- const PLACEHOLDER = 'Please_enter_text';
8
+ const PLACEHOLDER = 'Enter_text_or_press_forward_slash_to_insert_element';
9
9
  const Paragraph = _ref => {
10
10
  let {
11
11
  isComposing,
@@ -1,4 +1,4 @@
1
- import { CALL_OUT, CHECK_LIST_ITEM, CODE_BLOCK, IMAGE, LINK, ORDERED_LIST, PARAGRAPH, TABLE, UNORDERED_LIST, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6 } from '../../constants';
1
+ import { CALL_OUT, CHECK_LIST_ITEM, CODE_BLOCK, IMAGE, LINK, ORDERED_LIST, PARAGRAPH, TABLE, UNORDERED_LIST, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, BLOCKQUOTE } from '../../constants';
2
2
  export const SELECTED_ITEM_CLASS_NAME = 'sdoc-dropdown-item-selected';
3
3
  export const SHORT_INSERT_ELEMENT_USER_INPUT_MAP = {
4
4
  [IMAGE]: 'image',
@@ -15,5 +15,6 @@ export const SHORT_INSERT_ELEMENT_USER_INPUT_MAP = {
15
15
  [HEADER3]: 'header 3',
16
16
  [HEADER4]: 'header 4',
17
17
  [HEADER5]: 'header 5',
18
- [HEADER6]: 'header 6'
18
+ [HEADER6]: 'header 6',
19
+ [BLOCKQUOTE]: 'quote'
19
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Header"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Überschrift"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Header"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Encabezado"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Encabezado"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Encabezado"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "En-tête "
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "Exceeding the print limit, only the first 200 lines will be printed",
468
468
  "Show_record_numbers": "Show record numbers",
469
469
  "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
470
+ "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors",
471
+ "Header": "Intestazione"
471
472
  }
@@ -465,7 +465,8 @@
465
465
  "SeaTable_table": "Таблица SeaTable",
466
466
  "And_x_more_records": "и ещё {{count}} записей",
467
467
  "Print_limit_exceeded": "При превышении лимита печати будут напечатаны только первые 200 строк",
468
- "Show_record_numbers": "Show record numbers",
469
- "Alternate_color": "Alternate color",
470
- "Select_column_display_option_color_tip": "Single-select and multi-select columns display option colors"
468
+ "Show_record_numbers": "Показывать номера записей",
469
+ "Alternate_color": "Альтернативный цвет",
470
+ "Select_column_display_option_color_tip": "Цвета параметров отображения столбцов с одиночным и множественным выбором",
471
+ "Header": "Заголовок"
471
472
  }
@@ -467,5 +467,6 @@
467
467
  "Print_limit_exceeded": "超过打印限制, 只会打印前 200 行",
468
468
  "Show_record_numbers": "显示记录编号",
469
469
  "Alternate_color": "单双行不同背景色",
470
- "Select_column_display_option_color_tip": "单选列和多选列显示选项颜色"
470
+ "Select_column_display_option_color_tip": "单选列和多选列显示选项颜色",
471
+ "Header": "标题"
471
472
  }