Forum Themes:
Welcome !

 Youtube Editor Button?

Author Message
ErEf

  • Total Posts : 831
  • Reward points : 5585
  • Joined: Feb 15 '04
  • Status: offline
Youtube Editor Button? Mon. Jan 11, '10 1:12 PM (permalink)
0
is this a feature that will be added to next versions?
<message edited by Samuel on Tue. Jan 26, '10 10:23 AM>
 
#1
FreddyD

  • Total Posts : 825
  • Reward points : 33695
  • Joined: Mar 02 '02
  • Location: Louis Lake
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 11:48 AM (permalink)
0
Eref, you can add the buttons yourself with this article:

http://www.aspplayground.net/forum/tm.aspx?m=400713&high=buttons

I was looking to do the same and found this thread in addition to the instruction, so I thought I would let you know.
 
#2
ErEf

  • Total Posts : 831
  • Reward points : 5585
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 12:40 PM (permalink)
0
thnx freddyd, I appreciate your help.

but I probably would understand Russian better than this:
Second Method - in code behind
Instead of declaring your custom buttons in the ToolsFile.xml, you can also create them on the server by using the provided Telerik RadEditor's Server-Side API, e.g.:

you know, a feature so much asked about should be standard in the software. asppgd is great when you also have programmig skills, or you have a professional forum one can pay a programmer. I just manage with my cut and paste skills if it isn't to difficult and with the next update, all modifications are gone.
 
#3
ErEf

  • Total Posts : 831
  • Reward points : 5585
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 3:01 PM (permalink)
0
I think I have to learn Russian

Sam, RTEcustomJS.js is in ~/js not in ~editor/

i found ~/editor/RegToolsFile.xml
I added this tool
<tool name="Insert a Youtube movie" shortcut="CTRL+Y" iconurl="~/editor/icon_youtube.gif"/>
I uploaded this icon

 
 
I did find RTEcustomjs.js in ~js/

So I updated RTEcustomJS.js
Directly under
         RadEditorCommandList["Show Smilies"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                         editor.ShowDialog( 
                         RTEDialogLocation + "customsmiley.aspx" 
                         , arg 
                         , 470 
                         , 450 
                         , InsertSmiley 
                         , null 
                         , "Smilies"); 
                     return false; 
                 }; 

I inserted this
   RadEditorCommandList["Insert a Youtube movie"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                     EditorPasteHtml("[tube]" + editor.GetSelectionHtml() + "[/tube]");             };  

 
and.. taddaaaa.. the youtube button
 
<message edited by ErEf on Tue. Jan 26, '10 12:43 AM>
 
#4
yvangkwheng

  • Total Posts : 1
  • Reward points : 60
  • Joined: Jan 25 '10
  • Status: offline
Re:Admin sub menu Mon. Jan 25, '10 6:01 PM (permalink)
0
nice code. i hope this function gonna be added to the next version.
<message edited by yvangkwheng on Mon. Jan 25, '10 7:49 PM>



 
#5
ErEf

  • Total Posts : 831
  • Reward points : 5585
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Tue. Jan 26, '10 1:09 AM (permalink)
0
Sam,
 
I was looking into the code for this youtube button to unlink the inserted url and wrap the [tube] around it the same time, so that just one action is needed, just clicking the youtube button.
 
How can I add the unlink feature to the youtube button?
 
#6
Samuel

  • Total Posts : 11041
  • Reward points : 101590
  • Joined: May 23 '01
  • Status: offline
Re:Admin sub menu Tue. Jan 26, '10 10:29 AM (permalink)
0
To unlink, you can add this function call to your custom command function in the JS file, before calling the EditorPasteHtml function:

editor.Document.execCommand("Unlink", false, null);





ASPPlayground.net Developer
 
#7
ErEf

  • Total Posts : 831
  • Reward points : 5585
  • Joined: Feb 15 '04
  • Status: offline
Re:Admin sub menu Fri. Feb 5, '10 11:21 AM (permalink)
0
RTEcustomJS.js is in ~/js

i found ~/editor/RegToolsFile.xml
I added this tool
<tool name="Insert a Youtube movie" shortcut="CTRL+Y" iconurl="~/editor/icon_youtube.gif"/>
I uploaded this icon

  
goto  RTEcustomjs.js in ~js/ 
update directly under
         RadEditorCommandList["Show Smilies"] = 
                 function(commandName, editor, oTool) { 
                     restorePoint = editor.CreateRestorePoint(); 
                         editor.ShowDialog( 
                         RTEDialogLocation + "customsmiley.aspx" 
                         , arg 
                         , 470 
                         , 450 
                         , InsertSmiley 
                         , null 
                         , "Smilies"); 
                     return false; 
                 }; 

Inserted this
        RadEditorCommandList["Insert a Youtube movie"] =
                 function(commandName, editor, oTool) {
                     restorePoint = editor.CreateRestorePoint();
         editor.Document.execCommand("Unlink", false, null);
                     EditorPasteHtml("[tube]" + editor.GetSelectionHtml() + "[/tube]");                 };

 
and.. taddaaaa.. the youtube button with unlink option
so members just have to paste the youtube link select the link and press the youtube button
 
 
 
#8
Online Bookmarks Sharing: Share/Bookmark

The admin has set up some restrictions to prevent link (URL) SPAM.
Details...
  Enter the code shown; Click image to refresh.
Post Message   Preview
Jump to:

Current active users

There are 0 members and 1 guests.

Icon Legend and Permission

  • New Messages
  • No New Messages
  • Hot Topic w/ New Messages
  • Hot Topic w/o New Messages
  • Locked w/ New Messages
  • Locked w/o New Messages
  • Read Message
  • Post New Thread
  • Reply to message
  • Post New Poll
  • Submit Vote
  • Post reward post
  • Delete my own posts
  • Delete my own threads
  • Rate post

© 2000-2009 ASPPlayground.NET Forum Version 3.8 beta.