WP Editor Widget - Version 0.2.1

Version Description

  • CSS bug fix for hide button on WYSIWYG overlay
  • JS bug fix on get and set wpeditor content
Download this release

Release Info

Developer feedmeastraycat
Plugin Icon wp plugin WP Editor Widget
Version 0.2.1
Comparing to
See all releases

Code changes from version 0.2.0 to 0.2.1

assets/css/admin.css CHANGED
@@ -34,7 +34,7 @@
34
  background-position: -100px 0;
35
  }
36
  #wp-editor-widget-container .icon {
37
- background-image: url(../../../../wp-includes/images/uploader-icons.png);
38
  background-repeat: no-repeat;
39
  }
40
  #wp-editor-widget-container .close:active {
@@ -52,7 +52,7 @@
52
  (-webkit-min-device-pixel-ratio: 1.25),
53
  (min-resolution: 120dpi) {
54
  #wp-editor-widget-container .icon {
55
- background-image: url(../images/uploader-icons-2x.png);
56
  background-size: 134px 15px;
57
  }
58
  }
34
  background-position: -100px 0;
35
  }
36
  #wp-editor-widget-container .icon {
37
+ background-image: url(../../../../../wp-includes/images/uploader-icons.png);
38
  background-repeat: no-repeat;
39
  }
40
  #wp-editor-widget-container .close:active {
52
  (-webkit-min-device-pixel-ratio: 1.25),
53
  (min-resolution: 120dpi) {
54
  #wp-editor-widget-container .icon {
55
+ background-image: url(../../../../../wp-includes/images/uploader-icons-2x.png);
56
  background-size: 134px 15px;
57
  }
58
  }
assets/js/admin.js CHANGED
@@ -33,14 +33,26 @@ WPEditorWidget = {
33
  * Set editor content
34
  */
35
  setEditorContent: function(contentId) {
36
- tinyMCE.editors['wp-editor-widget'].setContent(jQuery('#'+ contentId).val());
 
 
 
 
 
 
37
  },
38
 
39
  /**
40
  * Update widget and close the editor
41
  */
42
  updateWidgetAndCloseEditor: function() {
43
- jQuery('#'+ this.currentContentId).val(tinyMCE.editors['wp-editor-widget'].getContent());
 
 
 
 
 
 
44
  wpWidgets.save(jQuery('#'+ this.currentContentId).closest('div.widget'), 0, 1, 0);
45
  this.hideEditor();
46
  }
33
  * Set editor content
34
  */
35
  setEditorContent: function(contentId) {
36
+ var editor = tinyMCE.EditorManager.get('wp-editor-widget');
37
+ if (typeof editor == "undefined") {
38
+ jQuery('#wp-editor-widget').val(jQuery('#'+ contentId).val());
39
+ }
40
+ else {
41
+ editor.setContent(jQuery('#'+ contentId).val());
42
+ }
43
  },
44
 
45
  /**
46
  * Update widget and close the editor
47
  */
48
  updateWidgetAndCloseEditor: function() {
49
+ var editor = tinyMCE.EditorManager.get('wp-editor-widget');
50
+ if (typeof editor == "undefined") {
51
+ jQuery('#'+ this.currentContentId).val(jQuery('#wp-editor-widget').val());
52
+ }
53
+ else {
54
+ jQuery('#'+ this.currentContentId).val(editor.getContent());
55
+ }
56
  wpWidgets.save(jQuery('#'+ this.currentContentId).closest('div.widget'), 0, 1, 0);
57
  this.hideEditor();
58
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: feedmeastraycat
3
  Tags: widget, wysiwyg, editor
4
  Requires at least: 3.5.1
5
  Tested up to: 3.5.2
6
- Stable tag: 0.2.0
7
  License: MIT
8
 
9
  WP Editor Widget adds a WYSIWYG widget using the wp_editor().
@@ -30,6 +30,10 @@ adding a custom post type for each widget.
30
 
31
  == Changelog ==
32
 
 
 
 
 
33
  = 0.2.0 =
34
  * Changed the WYSIWYG overlay button from "Update and close" to a primary button called "Save and close"
35
  * Changed so that the widget is saved when closing the WYSIWYG overlay
3
  Tags: widget, wysiwyg, editor
4
  Requires at least: 3.5.1
5
  Tested up to: 3.5.2
6
+ Stable tag: 0.2.1
7
  License: MIT
8
 
9
  WP Editor Widget adds a WYSIWYG widget using the wp_editor().
30
 
31
  == Changelog ==
32
 
33
+ = 0.2.1 =
34
+ * CSS bug fix for hide button on WYSIWYG overlay
35
+ * JS bug fix on get and set wpeditor content
36
+
37
  = 0.2.0 =
38
  * Changed the WYSIWYG overlay button from "Update and close" to a primary button called "Save and close"
39
  * Changed so that the widget is saved when closing the WYSIWYG overlay
wp-editor-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Editor Widget
4
  Plugin URI: http://oddalice.com/
5
  Description: WP Editor Widget adds a WYSIWYG widget using the wp_editor().
6
  Author: David Mårtensson, Odd Alice
7
- Version: 0.2.0
8
  Author URI: http://www.feedmeastraycat.net/
9
  */
10
 
@@ -27,7 +27,7 @@ class WPEditorWidget
27
  /**
28
  * @var string
29
  */
30
- const VERSION = "0.2.0";
31
 
32
  /**
33
  * @var string
4
  Plugin URI: http://oddalice.com/
5
  Description: WP Editor Widget adds a WYSIWYG widget using the wp_editor().
6
  Author: David Mårtensson, Odd Alice
7
+ Version: 0.2.1
8
  Author URI: http://www.feedmeastraycat.net/
9
  */
10
 
27
  /**
28
  * @var string
29
  */
30
+ const VERSION = "0.2.1";
31
 
32
  /**
33
  * @var string