The Text Formatting Toolbar symfony - symfony

Hiii,
I wanted to know if there are Text Formatting Toolbar for symfony to integrate into my textareas.
Someone can help or show a path.
Thanks for your help.

I guess, you are looking for something like TinyMCE.
Your question actually has nothing to deal with Symfony2 since it is client-side oriented.

Take a look at this bundle
https://github.com/genemu/GenemuFormBundle
It adds several new form fields to symfony forms, including a Tinymce form field which is what you need.

Related

Where is the New Order form on the ADMIN side generated in the core files?

I am having trouble locating where these form elements are being generated, specifically the "State" fields in the Billing and the Shipping sections. Clearly there is some javascript happening. I'm wondering where the HTML and the javascript are being generated in the core files?
I know, I know, don't edit the core files. Don't worry, this is for my own knowledge. I really appreciate any help.
Here is a screenshot of the State dropdown that I am specifically targeting:
Thanks for any insight you can provide :)

Best way to manage customizable texts in Symfony 2?

Anybody knows what's the best way to manage customizable texts in Symfony 2 like Wordpress?
I.E: slider titles, button texts, etc....
I'm implementing a simple BD table with customizable texts and then call it (array) before render the twig, but I think that exists a better way to do this. By XLIFF files for example?
Thanks a lot! :)
PD: Symfony 2.8 version
If I understand what you want correctly, take a look at the Translation Component in Symfony. You can store your button texts in a YAML file or something similar (seems like XLIFF) is supported and use those in your Twig templates.

how can i make a datagrid value searchable using dexterity in plone?

I have a custom content type built with dexterity and I have a datagrid on it. What I want to do is make the fields in the datagrid searchable with plone search engine. Please provide some sample if possible. im a noob.
thanks
Have you tried this?
https://pypi.python.org/pypi/collective.dexteritytextindexer
For best results I think you shold read the section "Registering a custom field converter".
In addition you may find interesting reading this similar SO question:
Extending SearchableText using collective.dexteritytextindexer
It's really well written and contains link to code examples in github.
Ciao

Symfony2 custom (HTML5) date field creation

My target is to create a custom Date field (which should work with Doctrine). The main difference with the basic Symfony's one is that it shouldn't be 3 dropdowns, but one <input type="date">.
I've tried several tutorials like Symfony's book and some helpful answers here.
However the more solutions I try to embed, the more problems I see.
Could anybody write or advise the tutorial for this task?
Thanks in advance.
The date field type supports that already. Just set the widget option to single_text and voila — you'll have what you want. No need to create a special type for that. :)
In Symfony >= 2.6 they introduced a html5 option which will generate a HTML5 input element.
You can see the documentation here: http://symfony.com/doc/current/reference/forms/types/date.html#html5

Drupal Hooks (hook_form_alter)

I’ve a question about Hooks. Being kind of new to Drupal I haven’t had much experience with hooks but a friend of mine suggested to get familiar with it and learn it to solve one of my problems on my site.
The thing is, that I have a module fbconnect which I use for users to connect via Facebook and use their profile picture at Facebook, on my site.
Everything is working, I’ve two checkboxes which and the connection and profile images works quite well but the problem is that above the two checkboxes I want a descriptive text to appear.
The only way I so far have to put in this text is to create a “description” field to the first checkbox. Unfortunately, it chooses to display this text beneath the checkbox so now it look kind of strange with a checkbox, a 3-4 lines descriptive text to the entire Facebook function, and then another checkbox.
If hooks are the right way to go to solve this problem, how do I actually do it and where do I actually insert the hook? I can imagine that it is the hook_form_alter function I need to have and in my fbconnect module the function fbconnect_form_alter exists but where I go from here I really have no idea.
I’ve tried to read up and see some instruction videos about hooks but I’m still puzzled about this apparently very nice feature in Drupal.
I'm using Drupal 6 for this site.
Any help or advice would be very much appreciated.
It sounds like you might also need to look at the Theme system in Drupal. In particular, take a look at theme_checkbox. From glancing at the code, there seems to be a label that is rendered after the actual checkbox. In your custom theme function or theme file you can try changing the order of the two.
In drupal, a "hook" is the way to interact with some piece of code.
In you have a hook_bar() hook, and is your module named 'foo' implements foo_bar(), then this function is executed.
In your case, you'll need to create a module, and impletements hook_form_alter()
You can find a tutorial there that show you how to add a checkbox. If you need to add some text, you can use the same method, except instead of adding a checkbox, of course, you just add a textfield
Here is an awesome beginner's video about adding custom hooks with the example of hook_form_alter from Drupalcon Chicago 2011 which is perfect for this situation and will hopefully help you in this. As a newbie to Drupal it surely helped me and I would highly recommend watching other videos. Thanks to the drupal community for posting these.
http://chicago2011.drupal.org/sessions/introduction-module-development

Resources