Browse Source

richeditor

es6
guy 7 years ago
parent
commit
05cbec7925
  1. 1368
      bi/base.js
  2. 1
      bi/core.css
  3. 21
      demo/js/base/editor/demo.rich_editor.js
  4. 4
      demo/js/config/base.js
  5. 1368
      dist/base.js
  6. 1
      dist/bundle.css
  7. 1368
      dist/bundle.js
  8. 1
      dist/core.css
  9. 26
      dist/demo.js
  10. 1325
      src/base/richeditor/nicEdit.js
  11. 42
      src/base/richeditor/richeditor.js
  12. 1
      src/css/core/normalize2.css
  13. 2
      src/less/core/normalize2.less

1368
bi/base.js

File diff suppressed because it is too large Load Diff

1
bi/core.css

@ -267,7 +267,6 @@ li {
list-style-type: none;
}
i {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

21
demo/js/base/editor/demo.rich_editor.js

@ -0,0 +1,21 @@
Demo.RichEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-rich-editor"
},
render: function () {
var editor = BI.createWidget({
type: "bi.rich_editor",
cls: "mvc-border",
width: 600,
height: 400
});
BI.createWidget({
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
items: [editor]
})
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);

4
demo/js/config/base.js

@ -66,6 +66,10 @@ Demo.BASE_CONFIG = [{
pId: 202,
text: "bi.formula_editor",
value: "demo.formula_editor"
}, {
pId: 202,
text: "bi.rich_editor",
value: "demo.rich_editor"
}, {
pId: 2,
id: 203,

1368
dist/base.js vendored

File diff suppressed because it is too large Load Diff

1
dist/bundle.css vendored

@ -267,7 +267,6 @@ li {
list-style-type: none;
}
i {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

1368
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

1
dist/core.css vendored

@ -267,7 +267,6 @@ li {
list-style-type: none;
}
i {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

26
dist/demo.js vendored

@ -809,7 +809,27 @@ BI.shortcut("demo.formula_editor", Demo.CodeEditor);Demo.CodeEditor = BI.inherit
}
}
});
BI.shortcut("demo.multifile_editor", Demo.CodeEditor);Demo.CodeEditor = BI.inherit(BI.Widget, {
BI.shortcut("demo.multifile_editor", Demo.CodeEditor);Demo.RichEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-rich-editor"
},
render: function () {
var editor = BI.createWidget({
type: "bi.rich_editor",
cls: "mvc-border",
width: 600,
height: 400
});
BI.createWidget({
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
items: [editor]
})
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);Demo.CodeEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-editor"
},
@ -3136,6 +3156,10 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 202,
text: "bi.formula_editor",
value: "demo.formula_editor"
}, {
pId: 202,
text: "bi.rich_editor",
value: "demo.rich_editor"
}, {
pId: 2,
id: 203,

1325
src/base/richeditor/nicEdit.js

File diff suppressed because it is too large Load Diff

42
src/base/richeditor/richeditor.js

@ -0,0 +1,42 @@
/**
* 富文本编辑器
*
* Created by GUY on 2017/9/15.
* @class BI.RichEditor
* @extends BI.Widget
*/
BI.RichEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.RichEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor bi-card"
});
},
_init: function () {
BI.RichEditor.superclass._init.apply(this, arguments);
var o = this.options;
this.editor = BI.createWidget({
type: "bi.layout",
tagName: "textarea",
width: o.width || "100%",
height: o.height || "100%"
});
BI.createWidget({
type: "bi.default",
element: this,
items: [this.editor]
})
},
mounted: function () {
this.ne = new BI.nicEditor({
maxHeight: this.options.height
}).panelInstance(this.editor.element[0]);
},
setValue: function (v) {
},
getValue: function () {
}
});
BI.shortcut('bi.rich_editor', BI.RichEditor);

1
src/css/core/normalize2.css

@ -37,7 +37,6 @@ li {
list-style-type: none;
}
i {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

2
src/less/core/normalize2.less

@ -38,7 +38,7 @@ li {
}
i {
font-style: normal;
//font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;

Loading…
Cancel
Save