Skip Navigation

[Résolu] Conflict: Trumbowyg & toolset-event-manager.min.js – backspace doesn't work

This support ticket is created Il y a 7 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 5 réponses, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 7 années.

Assisté par: Luo Yang.

Auteur
Publications
#595431

I am trying to: Use Trumbowyg editor on a generic post content field in a CRED form.
Trumbowyg: lien caché

The reason I'm using Trumbowyg is that the default visual editor in CRED gives access to too much in the link dialog. This particular CRED form is used in a member area for posting and editing a member-oriented Custom Post Type and I don't want the users to see what else is posted on the website via the link dialog.
Also, it doesn't seem that we have a possibility to configure what we want of buttons etc. in the default CRED visual editor.

Link to a page where the issue can be seen: lien caché (just a dummy site, that showcases the problem)

I expected to see: A fully working Trumbowyg editor in that textarea.

Instead, I got: One thing doesn't work in Trumbowyg - The backspace key. So the user can't delete text using that, which is a bit of a hassle.

I've figured out that it's a conflict between Trumbowyg and this particular javascript:
lien caché

If I block that using browser tools, backspace work again in Trumbowyg,

What does this script do and can I do without it in a form of this particular sort?

Edit: Would something like

wp_dequeue_script( 'toolset-event-manager' );

be possible? As far as I can see, the script is being registered in wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/toolset.assets.manager.class.php

#595528

Dear Jakob,

First, that JS file is CRED built-in JS file, it is not recommended to dequeue it, it will conduct other unexpecterd result.
And here is an example to dequeue the JS file:

add_action( 'init', 'my_func', 100);
function my_func(){
wp_dequeue_script( 'toolset-event-manager' );
}

More help:
https://codex.wordpress.org/Function_Reference/wp_dequeue_script

#595838

Alternatively, is there any way to trim down the default wysiwyg-editor in CRED?

#595852

There isn't such a built-in feature within CRED, please describe more details for what kind of "trim down the default wysiwyg-editor" do you need, we can take it as a feature request, our developers will evaluate it.

#596542

Things like:

1) Being able to choose which buttons/elements to use in the editor. Maybe I only need bold, italic and lists buttons. For instance, the "Read more"-button is of no use in a particular case, that I'm working on now. It is only confusing that it's there.

2) A simpler link dialog if I want one there at all. There are cases where I don't want the users of the form to see what's published on the site via Link Options, where you can browse all posts in all post types. Maybe if I could just filter that list to contain only posts in a particular post type, authored by the currently logged in user.

Maybe I will go with CSS hiding of unwanted buttons, but I would rather have them filtered out before the HTML being output.

#596563

Thanks for the details, I filed them into our feature request, our developers will evaluate it.