Closed (won't fix)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
5.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2008 at 07:59 UTC
Updated:
27 Nov 2009 at 14:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
maulwuff commentedOk, seems as if this scenario is completely undoable with fck.
I deleted the second profile and wanted to re-create it. Then it said, I can only assign one fck-profile per role. :(
Comment #2
wwalc commentedAt this moment, you can force simplified toolbar on some fields.
So it is somehow possible to use two different toolbars in one profile... but that's all.
Anyway, I've never thought about assigning multiple profiles to a single role depending on content type. Sounds interesting, feel free to propose a patch.
Comment #3
maulwuff commentedhehe, if I had a clue where to start, I might have already put something in :)
I did not have a look at the code, so my stupid proposal would sound like this:
- assuming, there are settings per node type
- on call of hook_form
--- check node type
--- return the appropriate profile
Do you think this is a passable way?
If it is, there need to be settings to assign a nodetype to a editor-profile.
In my eyes, assigning editor-profiles to roles is nonsense, because:
Assume you are a apprentice. Your task is to create the SAME workpiece as your instructor. The difference is, you have a handsaw, your instructor has a jigsaw. You will start scrubbing around with your handsaw, getting frustrated very quickly. Your instructor finishes in a fraction of time. Why all that? Life could be so easy ;)
That's the view I could compare me to my users. We all want to have a jigsaw for the same workpiece! On a different workpiece we want another tool, though.
Comment #4
wwalc commentedThat may be the way to go but... how could you check what is the current content type in fckeditor_process_textarea() in Drupal 5/6?
In Drupal7, there will probably be #input_format available in Form API (http://drupal.org/node/125315) to help wysiwyg editors to use the correct buttons... or even to choose the correct wysiwyg editor, I think I have no idea how this can be achieved in Drupal 5/6.
Comment #5
wwalc commented#252646: Simple editor everywhere but one textarea?, #273064: Allow profile to be used for a single node type and form for existing user roles marked as dup.
Comment #6
maulwuff commentedGood question. Is there any chance to get the node or the form at this point?
what about getting this info from the url?
while creating a node, the type is in the url: arg(3);
node/add/contenttype
on formedit we could use arg(1) to get the nid.
node/XX/edit
Comment #7
dwarner commentedmaulwuff's comment in comment#6 seems to be the way to go right now; these URLs are fairly fixed in Drupal 5, I believe. Let me know if there's anything I can do to help work on this.
Comment #8
wwalc commentedUnfortunately I may have no time this week to take care of this due to urgent server migration, but I like your ideas. Can you try to code it?
I can help if you have any specific questions.
Comment #9
dwarner commentedSure; I'll try to get a patch to everyone shortly.
I've started working on the admin interface to select content types and have added a new table for storing the selections (and added an update script).
Do people feel this should just be an additional requirement to the user roles? IE, an fckeditor instance will show up only if the user role AND the content type is chosen? If this is the case, it might mean that user roles won't be unique across fckeditor profiles.
Comment #10
maulwuff commented"user role AND the content type"
please not!!
Comment #11
dwarner commentedHow do you think the options should be setup so you can choose between roles and node types? Another radio box to choose between:
1) roles AND node types
2) roles OR node types
Either way, I still think the roles need to be allowed to be used across multiple fckeditor profiles; thoughts on that?
Comment #12
maulwuff commentedMy proposal is:
Choose either roles or content types.
Using roles + content types may be interesting too, though.
Maybe an opt-in? That is, checkboxes for roles and content types:
with both checked = roles + content types
with only roles checked = roles
with only content types checked = content types
do you think this is possible?
Comment #13
dwarner commentedThis is actually what I had in mind but did a poor job explaining; I'll keep working towards this.
Comment #14
dwarner commentedHere's my first stab at enabling per-node-type configuration; it should work like maulwuff said in #12.
Comment #15
wwalc commentedThat looks promissing! It doesn't work yet, for example it is impossible to select a role in "Roles allowed to use this profile" that is already used, but it definitely sounds like a way to go. It would be awesome if you could provide fully working patch.
Comment #16
radsail commentedI'am searching for this option too. I think it's a very usable feature. Especcially for comments and forums vs 'create content'. When I was searching for this feature I saw this search-result:
FCKeditor Plus
... of FCKeditor to meet Drupal website to provide different toolbar for regular content type, forum and comment. So, a "page" can ...
I'am not authorized to access that page (Don't know why, just a newbie on drupal) Maybe it's useful.
Comment #17
wwalc commented#245358: Change profile depending on content type or path marked as dup.
Comment #18
wwalc commented#284285: Cant disable fckEditor on edit sections of specyfic content type... marked as duplicate.
Comment #19
Jorrit commentedFixed in CVS (tag DRUPAL-6--2)
Comment #20
dwarner commentedThat's great to hear; sorry I hadn't been able to finish up my patch to make it function a little better.
Any chance of this being backported to the 5.x release? Would I be able to help with that at all?
Comment #21
avpadernoYou can find what the content type can be with two methods:
$form['#node']);From the node object you can know its type by calling
node_type(), and passing the node reference to the function.I hope this can help.
Comment #22
Jorrit commentedI got it from menu_get_item() in my patch actually, but it can be enhanced using your suggestions. An important note: currently this feature will only be made available for Drupal 6.
Comment #23
avpadernoUsing
menu_get_item()can be useful, without to pass any arguments, when the menu path is something likenode/<nid>; it could not be of any help if the path is node/page/add, i.e.Comment #24
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #25
TimG1 commentedHi I had the same problem. I read the thread above, but I still don't understand how to set this up. Sorry, I'm still pretty new to Drupal.
How do I set this up from the web admin? I tried just going into Site Configuration > FCKEditor > Visibility Settings > Paths to Include/Exclude: and then typed this in the box.... manuals/*. But, when I go to my page and then click the Edit tab, my URL changes to node/###/edit and I still see the FCKEditor.
I'm using Drupal 6 & FCKeditor 6.x-1.3-rc1
Thanks!
-Tim
Comment #26
mvcThe patch in #14 worked for me for 5.x-2.2-rc3, except that
should be
or else the editor won't launch when creating new nodes which have _ in their machine names. I'm attaching a new patch for anyone else still using the 5.x-2.2 branch which works for me (reviews welcome).
Comment #27
mvcUpdating version number and status, since patch is ready for review for inclusion in the 5.x-2.2 branch.
Comment #28
jaydub commentedI've re-rolled the patches from #14 and #26 (which didn't have the changes to fckeditor.install) against the latest 5.x-2.x code in CVS.
I reworked the query in fckeditor_user_get_profile() a bit in to make it cleaner and used a d6 db_placeholders() like hack to properly set the placeholders for the portion of the query doing an IN clause where the IN values are role IDs and thus integers.
Comment #29
Jorrit commentedThis has been implemented in 6.x-2.x, will not be done in 5.x.
Comment #30
dagomar commentedPerhaps related issue, I may create a new issue for this:
I have a basic fckeditor profile for all roles.
I have an advanced profile for site maintainer role.
On one content type, I want the maintainer role to use the basic fckeditor profile. So I tuned off the visibility for the path (i'm using pathauto). But now the maintainers do not have an editor, and everybody else does for that node type. I would expect it would fall back on the basic profile, but it doesnt.
-- Edit --
Ok, So I figured this out for my use case, simply forsing the basic config for the specific fields is what i was after.