Editor Contribution Issues

3 views
Skip to first unread message

Dan Vega

unread,
May 10, 2010, 10:17:02 PM5/10/10
to cfb-extensions-dev
When I was building the Pastebin Extension (http://
pastebin.riaforge.org) I came across 2 issues that I want to share
with everyone. In the extension you can select text from the editor
and then right click in the editor > Pastebin > Post A New Pastebin.

The 1st problem is there is no way to stop someone from selecting
nothing My question to you guys do you think this should be normal
behavior or should we file an ER that forces some kind of selection
before showing the menu. The other option I was thinking about was
adding some kind of filter for editor. Here we are telling the
selection that it must be at least 1 character in length.

<contribution target="editor">
<menu name="Pastebin">
<filters>
<filter type="selection" min="1"/>
</filters>
<action name="Post A New Pastebin" handlerid="new"
showresponse="true"/>
</menu>
</contribution>

The 2nd problem I noticed is that the editor menus only show up
in .cfm and .cfc files. I think that if I open an xml file in the
ColdFusion Builder XML Editor that my menus should work there as
well.

Just thought I would bring these 2 things up for discussion because I
imagine you will run into this at some point.

Raymond Camden

unread,
May 10, 2010, 10:30:18 PM5/10/10
to cfb-exten...@googlegroups.com
I don't know if minlength makes sense. I can see tht being confusing
if someone did something weird with it. However, I _can_ see being
able to demand that you select something. Then again, I'd treat an
empty selection as an implied selection of the entire page.
--
===========================================================================
Raymond Camden, ColdFusion Jedi Master

Email : r...@camdenfamily.com
Blog : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with the community: http://www.coldfusionbloggers.org

Dan Vega

unread,
May 10, 2010, 10:32:17 PM5/10/10
to cfb-extensions-dev
That is a good idea, I like the non selection just using the entire
template.
Reply all
Reply to author
Forward
0 new messages