Ticket #548 (new New Feature)

Opened 3 years ago

Last modified 7 months ago

Context menu should recursively allow user to edit parent's Tags

Reported by: dricks2222 Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: HasPatch Cc:

Description (last modified by alfonsoml) (diff)

If you have :

<P>
  <DIV>
    <TABLE>
      <TR>
        <TD>
        Cursor here
        </TD>
      </TR>
    </TABLE>
  </DIV>
</P>

And you right click where 'Cursor here' is, the context menu should show :


Edit Table Cell
Edit Table Row
Edit Table
Edit DIV
Edit P


All the hierarchy until you reach the <BODY> Tag. Else, how are you suppose to edit the style of a the P tag for instance? ...

Attachments

fckplugin.js Download (10.2 KB) - added by dricks2222 3 years ago.
nodePath modified plugin

Change History

Changed 3 years ago by dricks2222

Sorry, i missed the Wiki formatting. So, the menu should be :

Edit Table Cell
Edit Table Row
Edit Table
Edit DIV
Edit P

Changed 3 years ago by alfonsoml

  • description modified (diff)

Having the full hierarchy of DOM nodes show up in the context menu sounds like a bad idea. After all it's a context menu, so it should show things relative only to the context, and everything beyond the table isn't needed:

if you want to edit the div or p (supposing that there are the proper commands for those tags) should be available when you right click on that element, or you would end up with a context menu really too long as soon as some elements get nested.

There are other options like having a status bar with all the nodes (available as a plugin) that are better suited if you want to show all the hierarchy anyway.

Voting for WontFix.

Changed 3 years ago by fredck

I also see the "Elements Path Bar" as a better option, but I'm sure others would also enjoy the context menu thing. I don't think it would be a core feature. I see it as a plugin instead.

There is no bad on leaving this ticket open, even if we'll not be working on it right now. It could motivate others to contribute this plugin.

Changed 3 years ago by dricks2222

I used the nodePath plugin to start with.
I changed it so you can now change ID and style of every editable tag, as well as the innerHTML (when available).

You have to change the NodePathImg variable in the js to have a correct img button. I haven't been able to find in which CSS the 'WYSIWYGPfad' have to be, so styles are hard-coded. Works pretty well both on IE and FFx. Not tested with other navigators. See attachment for plugin.

Changed 3 years ago by dricks2222

nodePath modified plugin

Changed 2 years ago by w.olchawa

  • keywords HasPatch added
Note: See TracTickets for help on using tickets.