Enable tinyMce on all the nodes except one - drupal

node/*
user/*
comment/*
This is what I am using to enable tinyMCE Drupal on particular pages.
Now what I am looking for is to apply on all the NODES except the one having id (eg 100). How can I do that?

Use the WYISWYG API module and input formats.
Make an input format called Node100, which is a clone of the usual input format what you use for nodes. Do not enable TinyMCE on that input format. Set the input format for that node.

Take a look at this:
http://drupal.org/node/121331
It goes into depth on how to enable TinyMCE. I believe there is a Drupal admin setting for doing what you want.

Related

How to hide order index of variations in Patternlab using Handlebars?

I am using indexes to order Patterns. As recommended I am putting some spaces between the pattern indexes in case i would like to reorder some later.
I am naming the files like shown in https://patternlab.io/docs/reorganizing-patterns/.
It does work. As you can see in the next screenshot, the index is also shown in the rendered page. Is there a way to hide it or am I doing something wrong? Is there maybe a different approach using Handlebars (.hbs) files?
The easiest would be to migrate to the newest patternlab version and use the „order“ property introduced to get set via .md files, compare to the new content on the page you mentioned in your post.

2sxc - Calculated Fields implementation

Can I make calculated fields in 2sxc?
Something like url path, but to use more fields and some additional logic?
Is the only way to do this custom property editor?
I also know for this video about url-path:
http://2sxc.org/en/Docs/Feature/feature/8305
But don't know where are sources for this editor that I can copy it and modify for my needs.
You would need to create a custom input type - see http://2sxc.org/en/Blog/post/custom-input-type-advanced-dynamic-data
the code for the url-path is here: https://github.com/2sic/eav-ui/blob/master/src/edit/fields/string/string-url-path.js

TinyMCE 3.5.8: Detailed Steps for Creating a Button that Acquires a Value from User and Inserts it Between a Pair of Tags

TinyMCE 3.5.8
I merely need to create a button (and module) that acquires a user-entered value from a popup and places it between two tags, e.g., [bib][/bib]
I am having trouble finding a "step-by-step" for doing this, including what files, where code goes, etc. This must be rather simple?
I have replaced all of the occurrences of "example" with my module name in the "Example" module, but that is where my information ends.
If someone would be so kind !
P.S.: It would be even better if the form field would javascript validate for "integer", but maybe I ask too much?
download the tinymce development version
use tiny_mce_dev.js instead of tinymce.js for developement in order to get more usefull error messages
create an own tinymce plugin (this is not that difficult) that opens a popup
get the content of a popup field
insert it at the right place in the editor
You should have a look at other tinymce plugins (in the plugins directory under the tiny_mce dir) to get to know how some things work. There are many plugins, some of them use popups.
I.E. the searchreplace popup

Drupal views add form to add record

I have some view which lists my module table entries.
What is the most elegant way to attach a form below the view to add record?
Waht I am trying to do know is:
I created dedicated form in my module:
function my_module_form_add_record($form_state) {
form fields.....
}
I added to the view theme file:
$add_form = drupal_get_form('my_module_form_add_record');
print $add_form;
But I do not like this solution for at least 2 reasons:
I does not work ...
2. Even if it worked - it is depended on the theme file! So if I change the theme - functionality is crashed.
I would like to find more elegant solution to attach form from custom module to the view.
I know of the existence of the "Views Attach" module but it has no option of adding custom forms.
I know also of the existence of the Views Embedded form (and I am usig it) but it is only useful if you want to add form to the every row.
Seems the must be some solution to add record from the view page!
Thanks you for help.
you could use hook_views_pre_render:
This hook is called right before the render process. The query has been executed, and the pre_render() phase has already happened for handlers, so all data should be available.
Adding output to the view can be accomplished by placing text on $view->attachment_before and $view->attachment_after. Altering the content can be achieved by editing the items of $view->result.

Specifying edit paths in Drupal for FCKEditor?

With the FCKEditor, you can specifiy paths where the editor must be included. Eg.
node/add/email
Which works great, until you need to go back and EDIT that node. Which means you end at a path like so:
node/284/edit
Now, the fck editor no longer works, because the path isn't valid.
Is there any way that one can get the FCKEditor to work for both the normal path and the edit path of ONE SPECIFIC CONTENT TYPE?
I'm not sure if you can do this with stock the FCKEditor module. However, you can do it by using the WYSIWYG API module, which allows you to specify WYWIWYG editors on a per-input-filter basis, and Better Formats, which allows you to set input filter formats on a per-node-type basis.

Resources