Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordPress issues fix : #2310 #21

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions admin/class-froala-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ public function enqueue_styles() {
wp_register_style('table_css',plugin_dir_url( __FILE__ ) . 'css/plugins/table.css');
wp_register_style('video_css',plugin_dir_url( __FILE__ ) . 'css/plugins/video.css');
wp_register_style('files_manager_css',plugin_dir_url( __FILE__ ) .'css/plugins/files_manager.css');
wp_enqueue_style('froala_editor_css');
wp_register_style('code_view_css',plugin_dir_url( __FILE__ ) . 'css/plugins/code_view.min.css');
wp_register_style('codemirror-css', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.css');

wp_enqueue_style('froala_editor_css');
wp_enqueue_style('froala_style_css');
wp_enqueue_style('froala_admin_css');
wp_enqueue_style('font_asm');
Expand All @@ -134,15 +137,16 @@ public function enqueue_styles() {
wp_enqueue_style('table_css');
wp_enqueue_style('video_css');
wp_enqueue_style('files_manager_css');
}
wp_enqueue_style('code_view_css');
wp_enqueue_style('codemirror-css');
}

/**
* Register the JavaScript for the admin area.
*
* @since 1.0.0
*/
public function enqueue_scripts() {

/**
* An instance of this class should be passed to the run() function
* defined in Froala_Loader as all of the hooks are defined
Expand All @@ -155,10 +159,12 @@ public function enqueue_scripts() {

wp_register_script('froala_admin',plugin_dir_url( __FILE__ ) . 'js/froala-admin.js');
wp_register_script('froala_editor',plugin_dir_url( __FILE__ ) . 'js/froala_editor.min.js');

wp_enqueue_script('froala_admin');
wp_enqueue_script('froala_editor');
}
wp_enqueue_script('codemirror-js', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js');
wp_enqueue_script('codemirror-xml-js', 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js');
}

/**
* Add an options page
Expand Down Expand Up @@ -330,7 +336,7 @@ public function froala_editor ($settings, $editor_id = null) {
}

foreach ($this->active_plugins as $script) {
echo "\t\t" . '<script type="text/javascript" src="' . plugins_url( 'admin/js/plugins/' . $script . $suffix, dirname( __FILE__ ) ) . '"></script>' . "\n"; // xss ok
echo "\t\t" . '<script type="text/javascript" src="' . plugins_url( 'admin/js/plugins/' . $script . $suffix, dirname( __FILE__ )) . '"></script>' . "\n"; // xss ok
}

if ($editor_id == null) {
Expand Down
4 changes: 4 additions & 0 deletions admin/css/froala-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ div.fr-modal-body div.fr-image-list div.fr-image-container .fr-insert-img {
-ms-transform: translateY(-50%) translateX(-50%) !important;
-o-transform: translateY(-50%) translateX(-50%) !important;
}

.fr-dropdown-list h2 a {
text-decoration: none !important;
}
Loading