windy 7 years ago
parent
commit
f83e0ab114
  1. 27
      demo/js/base/editor/demo.rich_editor.js
  2. 18
      dist/_fineui.min.js
  3. 13
      dist/bundle.js
  4. 36
      dist/bundle.min.js
  5. 13
      dist/case.js
  6. 27
      dist/demo.js
  7. 18
      dist/fineui.min.js
  8. 1
      src/case/colorchooser/colorchooser.js
  9. 1
      src/case/richeditor/plugins/combo.backgroundcolorchooser.js
  10. 11
      src/case/richeditor/richeditor.js

27
demo/js/base/editor/demo.rich_editor.js

@ -4,23 +4,21 @@ Demo.RichEditor = BI.inherit(BI.Widget, {
},
render: function () {
var self = this;
this.editor = BI.createWidget({
type: "bi.rich_editor",
cls: "bi-border",
width: 600,
height: 400
});
BI.createWidget({
type: "bi.vertical",
type: "bi.absolute",
element: this,
hgap: 30,
vgap: 50,
items: [this.editor, {
type: "bi.button",
text: "focus",
handler: function () {
self.editor.focus();
items: [{
el: {
type: "bi.rich_editor",
cls: "bi-border",
ref: function () {
self.editor = this;
}
},
left: 10,
top: 10,
bottom: 10,
right: 10
}]
});
},
@ -30,6 +28,7 @@ Demo.RichEditor = BI.inherit(BI.Widget, {
var src = image.src;
var style = image.style;
this.editor.setValue("<div>这是一条<font size=\"4\" color=\"#009de3\">测试</font>数据<img class=\"rich-editor-param\" width='" + image.width + "' height='" + image.height + "' src='" + src + "' style='" + style + "' /></div>");
this.editor.setBackColor("#aacf53");
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);

18
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/bundle.js vendored

@ -75861,7 +75861,6 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}]
},
stopPropagation: false,
minWidth: 202,
minWidth: 202
},
value: o.value
@ -83202,6 +83201,7 @@ BI.RichEditorBackgroundColorChooser = BI.inherit(BI.RichEditorAction, {
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
self.fireEvent("EVENT_CHANGE", backgroundColor);
});
},
@ -83455,7 +83455,9 @@ BI.RichEditor = BI.inherit(BI.Widget, {
if(o.readOnly) {
return editor;
}
this.editor = BI.createWidget(editor);
this.editor = BI.createWidget(BI.extend(editor, {
height: "100%"
}));
return {
type: "bi.combo",
toggle: false,
@ -83501,6 +83503,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setBackColor: function (backgroundColor) {
this.editor.element.css({
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
},
getValue: function () {
return this.editor.getValue();
}

36
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/case.js vendored

@ -3656,7 +3656,6 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}]
},
stopPropagation: false,
minWidth: 202,
minWidth: 202
},
value: o.value
@ -10997,6 +10996,7 @@ BI.RichEditorBackgroundColorChooser = BI.inherit(BI.RichEditorAction, {
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
self.fireEvent("EVENT_CHANGE", backgroundColor);
});
},
@ -11250,7 +11250,9 @@ BI.RichEditor = BI.inherit(BI.Widget, {
if(o.readOnly) {
return editor;
}
this.editor = BI.createWidget(editor);
this.editor = BI.createWidget(BI.extend(editor, {
height: "100%"
}));
return {
type: "bi.combo",
toggle: false,
@ -11296,6 +11298,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setBackColor: function (backgroundColor) {
this.editor.element.css({
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
},
getValue: function () {
return this.editor.getValue();
}

27
dist/demo.js vendored

@ -857,23 +857,21 @@ BI.shortcut("demo.multifile_editor", Demo.CodeEditor);Demo.RichEditor = BI.inher
},
render: function () {
var self = this;
this.editor = BI.createWidget({
type: "bi.rich_editor",
cls: "bi-border",
width: 600,
height: 400
});
BI.createWidget({
type: "bi.vertical",
type: "bi.absolute",
element: this,
hgap: 30,
vgap: 50,
items: [this.editor, {
type: "bi.button",
text: "focus",
handler: function () {
self.editor.focus();
items: [{
el: {
type: "bi.rich_editor",
cls: "bi-border",
ref: function () {
self.editor = this;
}
},
left: 10,
top: 10,
bottom: 10,
right: 10
}]
});
},
@ -883,6 +881,7 @@ BI.shortcut("demo.multifile_editor", Demo.CodeEditor);Demo.RichEditor = BI.inher
var src = image.src;
var style = image.style;
this.editor.setValue("<div>这是一条<font size=\"4\" color=\"#009de3\">测试</font>数据<img class=\"rich-editor-param\" width='" + image.width + "' height='" + image.height + "' src='" + src + "' style='" + style + "' /></div>");
this.editor.setBackColor("#aacf53");
}
});
BI.shortcut("demo.rich_editor", Demo.RichEditor);/**

18
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

1
src/case/colorchooser/colorchooser.js

@ -50,7 +50,6 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}]
},
stopPropagation: false,
minWidth: 202,
minWidth: 202
},
value: o.value

1
src/case/richeditor/plugins/combo.backgroundcolorchooser.js

@ -33,6 +33,7 @@ BI.RichEditorBackgroundColorChooser = BI.inherit(BI.RichEditorAction, {
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
self.fireEvent("EVENT_CHANGE", backgroundColor);
});
},

11
src/case/richeditor/richeditor.js

@ -41,7 +41,9 @@ BI.RichEditor = BI.inherit(BI.Widget, {
if(o.readOnly) {
return editor;
}
this.editor = BI.createWidget(editor);
this.editor = BI.createWidget(BI.extend(editor, {
height: "100%"
}));
return {
type: "bi.combo",
toggle: false,
@ -87,6 +89,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setBackColor: function (backgroundColor) {
this.editor.element.css({
backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor)
});
},
getValue: function () {
return this.editor.getValue();
}

Loading…
Cancel
Save