OK, Now I have 2 additional questions.
1) I have 1 style in the listbox called Heading (code highlighted in blue).
If a user selects some text say 123 and then selects Heading we end up getting:
<FONT class=heading>123</font> ...... which is what we should get.
If a user should select 123 again and select Heading, we then get:
<FONT class=heading><FONT class=heading><FONT class=heading>123</font></font></font>.
Why did it add the FONT tags again?
Why did it add 2 additional FONT tags the 2nd time.
2) I added a custom button that when clicked calls the _Format function passing the parameters "Editor,'setStyle','pull'" ..... same as
what the style listbox does. But when a user selects some text say 123 and then clicks this custom button it generates the
following:
123<FONT class=pull></FONT>
When I try and debug the code, I see that when it looks to see what text is selected it comes back with "".
Is there something I am missing??
<%
dim temp_styledropdownMenuNames,temp_styledropdownMenuList
dim content
content = "Type here..."
Dim editor
Set editor = New CuteEditor 'Create a new editor class object
editor.ID = "Editor" 'Set the ID of this editor class
editor.Text = content 'Set the initial HTML value of editor control
editor.MaxImageSize = 50
editor.Template = "Save,New,Print,Separator,Cut,Copy,Paste,PasteText,PasteWord,Delete,Separator,Undo,Redo,Separator,G_Start,ToggleBorder,AbsolutePosition,G_End,G_Start,Separator,Char,InsertText,G_End,G_Start,Separator,ImageGallery,G_End,G_Start,Separator,InsertTable,AddRow,DeleteRow,AddColumn,DeleteColumn,Separator,AddCell,DeleteCell,MergeCell,SplitCell,Separator,EditRow,EditCell,G_End,G_Start,Break,Bold,Italic,Underline,G_End,G_Start,Separator,JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone,Separator,FontColor,HighLight,G_End,G_Start,Separator,InsertOrderedList,InsertUnorderedList,Separator,Indent,Outdent,G_End,G_Start,Separator,Subscript,Superscript,Strikethrough,Separator,InsertTime,InsertDate,Separator,Hr,Link,UnLink,DownloadableFiles,Separator,RemoveFormat,SelectAll,SelectNone,Help,G_End,break,styleDropDown,paragraphDropDown,zoomDropDown"
temp_styledropdownMenuNames = "Heading"
temp_styledropdownMenuList = "Heading"
editor.StyleDropDownMenuNames = temp_styledropdownMenuNames
editor.StyleDropDownMenuList = temp_styledropdownMenuList
editor.CustomAddons = "<span title=""Custom Addons"" class=""button"" onclick=""_Format(Editor,'setStyle','pull');"" type=""btn"" border=""0"">Insert HTML1</span>"
editor.Draw()
%>
<%
dim content
content = "Type here..."
Dim editor
Set editor = New CuteEditor 'Create a new editor class object
' editor2.subsequent = true
editor.ID = "Editor" 'Set the ID of this editor class
editor.Text = content 'Set the initial HTML value of editor control
editor.ParagraphsList = "Normal,Heading 1,Heading 2,Heading 3,Formatted,Definition Term,Dave Test1,Dave Test2,Dave Test3"
editor.FilesPath = "/NewHay/EditorTool/CuteEditor_Files"
editor.ImageGalleryPath = "/NewHay/Images/Uploaded"
editor.MaxImageSize = 50
' editor2.Height = 50
editor.Template = "Save,New,Print,Separator,Cut,Copy,Paste,PasteText,PasteWord,Delete,Separator,Undo,Redo,Separator,G_Start,ToggleBorder,AbsolutePosition,G_End,G_Start,Separator,Char,InsertText,G_End,G_Start,Separator,ImageGallery,G_End,G_Start,Separator,InsertTable,AddRow,DeleteRow,AddColumn,DeleteColumn,Separator,AddCell,DeleteCell,MergeCell,SplitCell,Separator,EditRow,EditCell,G_End,G_Start,Break,Bold,Italic,Underline,G_End,G_Start,Separator,JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone,Separator,FontColor,HighLight,G_End,G_Start,Separator,InsertOrderedList,InsertUnorderedList,Separator,Indent,Outdent,G_End,G_Start,Separator,Subscript,Superscript,Strikethrough,Separator,InsertTime,InsertDate,Separator,Hr,Link,UnLink,DownloadableFiles,Separator,RemoveFormat,SelectAll,SelectNone,Help,G_End,break,styleDropDown,paragraphDropDown,zoomDropDown"
editor.CustomAddons = "
"" class=""button"" onclick=""_Format(Editor,'setStyle','pull');"" type=""btn"" border=""0"">Insert HTML1"
editor.Draw()
%><%
dim content
content = "Type here..."
Dim editor
Set editor = New CuteEditor 'Create a new editor class object
' editor2.subsequent = true
editor.ID = "Editor" 'Set the ID of this editor class
editor.Text = content 'Set the initial HTML value of editor control
editor.ParagraphsList = "Normal,Heading 1,Heading 2,Heading 3,Formatted,Definition Term,Dave Test1,Dave Test2,Dave Test3"
editor.FilesPath = "/NewHay/EditorTool/CuteEditor_Files"
editor.ImageGalleryPath = "/NewHay/Images/Uploaded"
editor.MaxImageSize = 50
' editor2.Height = 50
editor.Template = "Save,New,Print,Separator,Cut,Copy,Paste,PasteText,PasteWord,Delete,Separator,Undo,Redo,Separator,G_Start,ToggleBorder,AbsolutePosition,G_End,G_Start,Separator,Char,InsertText,G_End,G_Start,Separator,ImageGallery,G_End,G_Start,Separator,InsertTable,AddRow,DeleteRow,AddColumn,DeleteColumn,Separator,AddCell,DeleteCell,MergeCell,SplitCell,Separator,EditRow,EditCell,G_End,G_Start,Break,Bold,Italic,Underline,G_End,G_Start,Separator,JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone,Separator,FontColor,HighLight,G_End,G_Start,Separator,InsertOrderedList,InsertUnorderedList,Separator,Indent,Outdent,G_End,G_Start,Separator,Subscript,Superscript,Strikethrough,Separator,InsertTime,InsertDate,Separator,Hr,Link,UnLink,DownloadableFiles,Separator,RemoveFormat,SelectAll,SelectNone,Help,G_End,break,styleDropDown,paragraphDropDown,zoomDropDown"
editor.CustomAddons = "
"" class=""button"" onclick=""_Format(Editor,'setStyle','pull');"" type=""btn"" border=""0"">Insert HTML1"
editor.Draw()
%>