fx-platform-ui 0.0.13-alpha1 → 0.0.13-alpha3

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.
@@ -5,29 +5,29 @@ import { PlatEditorProps } from '../plat-editor-props'
5
5
  import { isFunction } from '../../../../utils/is'
6
6
 
7
7
  const DEFAULT_INIT = {
8
- selector: 'textarea',
9
- placeholder: '在这里输入文字',
10
- language_url: '/tinymce/langs/zh-Hans.js', // 语言包的路径,具体路径看自己的项目,文档后面附上中文js文件
11
- language: 'zh-Hans', //语言
12
- skin_url: '/tinymce/skins/ui/oxide', // skin路径,具体路径看自己的项目
13
- height: 500, //编辑器高度
14
- branding: false, //是否禁用“Powered by TinyMCE”
15
- menubar: true, //顶部菜单栏显示
16
- image_dimensions: true, //图片宽高属性
17
- promotion: false, // 去除高级功能升级的促销按钮
18
- plugins:
19
- 'wordcount table searchreplace pagebreak fullscreen codesample autolink anchor autolink image media lists link code image', //这里的数据是在props里面就定义好了的
20
- toolbar:
21
- 'fontsize fontfamily fontsizeselect fontselect bold italic lineheight underline alignleft aligncenter alignright alignjustify anchor | undo redo | formatselect | forecolor backcolor | bullist numlist outdent indent | lists link image axupimgs media table | removeformat | fullscreen|preview code codesample|searchreplace', //这里的数据是在props里面就定义好了的
22
- paste_webkit_styles: 'all',
23
- paste_merge_formats: true,
24
- nonbreaking_force_tab: false,
25
- paste_auto_cleanup_on_paste: false,
26
- file_picker_types: 'file image media',
27
- fontsize_formats: '8pt 10pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 36pt',
28
- font_formats:
29
- "微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';幼圆='幼圆';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings",
30
- content_css: '/tinymce/skins/content/default/content.css' //以css文件方式自定义可编辑区域的css样式,css文件需自己创建并引入
8
+ // selector: 'textarea',
9
+ // placeholder: '在这里输入文字',
10
+ // language_url: '/tinymce/langs/zh-Hans.js', // 语言包的路径,具体路径看自己的项目,文档后面附上中文js文件
11
+ // language: 'zh-Hans', //语言
12
+ // skin_url: '/tinymce/skins/ui/oxide', // skin路径,具体路径看自己的项目
13
+ // height: 500, //编辑器高度
14
+ // branding: false, //是否禁用“Powered by TinyMCE”
15
+ // menubar: true, //顶部菜单栏显示
16
+ // image_dimensions: true, //图片宽高属性
17
+ // promotion: false, // 去除高级功能升级的促销按钮
18
+ // plugins:
19
+ // 'wordcount table searchreplace pagebreak fullscreen codesample autolink anchor autolink image media lists link code image', //这里的数据是在props里面就定义好了的
20
+ // toolbar:
21
+ // 'fontsize fontfamily fontsizeselect fontselect bold italic lineheight underline alignleft aligncenter alignright alignjustify anchor | undo redo | formatselect | forecolor backcolor | bullist numlist outdent indent | lists link image axupimgs media table | removeformat | fullscreen|preview code codesample|searchreplace', //这里的数据是在props里面就定义好了的
22
+ // paste_webkit_styles: 'all',
23
+ // paste_merge_formats: true,
24
+ // nonbreaking_force_tab: false,
25
+ // paste_auto_cleanup_on_paste: false,
26
+ // file_picker_types: 'file image media',
27
+ // fontsize_formats: '8pt 10pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 36pt',
28
+ // font_formats:
29
+ // "微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';幼圆='幼圆';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings",
30
+ // content_css: '/tinymce/skins/content/default/content.css' //以css文件方式自定义可编辑区域的css样式,css文件需自己创建并引入
31
31
  }
32
32
 
33
33
  export const useEditorState = (props: PlatEditorProps) => {
@@ -32,12 +32,13 @@ import 'tinymce/plugins/autolink'
32
32
  import 'tinymce/plugins/anchor'
33
33
 
34
34
  import { platEditorProps } from './plat-editor-props'
35
+ import { platEditorEmits } from './plat-editor-emits'
35
36
  import { useEditorState } from './hook'
36
37
  defineOptions({
37
38
  name: 'PlEditor'
38
39
  })
39
40
  const props = defineProps(platEditorProps)
40
- const emit = defineEmits(['update:value', 'change'])
41
+ const emit = defineEmits(platEditorEmits)
41
42
 
42
43
  const { init, modelValue } = useEditorState(props)
43
44
  const editorBorder = ref('1px solid #d9d9d9')
@@ -1 +1 @@
1
- export const platEditorEmits = ['change', 'init']
1
+ export const platEditorEmits = ['update:value', 'change']