diff --git a/cognito-forms.php b/cognito-forms.php index 6ade6df..7a04bda 100644 --- a/cognito-forms.php +++ b/cognito-forms.php @@ -44,7 +44,8 @@ if ( !class_exists( 'CognitoFormsPlugin' ) ) { private static $actions = array( 'admin_init', 'admin_menu', - 'init' + 'init', + 'wp_ajax_cognito_tinymce_dialog' ); // Supported shortcodes @@ -182,6 +183,11 @@ if ( !class_exists( 'CognitoFormsPlugin' ) ) { return $plugin_array; } + public function wp_ajax_cognito_tinymce_dialog() { + include 'tinymce/dialog.php'; + wp_die(); + } + // Initialize administration menu (left sidebar) public function admin_menu() { add_menu_page( 'Cognito Forms', 'Cognito Forms', 'manage_options', 'Cognito', array( $this, 'main_page' ), "data:image/svg+xml;base64," . base64_encode( file_get_contents( plugin_dir_path( __FILE__ ) . 'cogicon.svg' ) ) ); diff --git a/tinymce/dialog.php b/tinymce/dialog.php index 8c82a4e..2f2bb28 100644 --- a/tinymce/dialog.php +++ b/tinymce/dialog.php @@ -17,6 +17,8 @@ */ ?> + + @@ -29,6 +31,7 @@ margin: 0; padding: 0; height: 100%; + line-height: 0; } #cognito-frame { width: 100%; @@ -38,7 +41,7 @@ - +