Skip to content

Commit

Permalink
tiny setting in widget projects
Browse files Browse the repository at this point in the history
about page tweak
  • Loading branch information
ninianne98 committed Apr 24, 2024
1 parent f6ba403 commit a415bb4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 24 deletions.
27 changes: 14 additions & 13 deletions CMSAdmin/c3-admin/Includes/tinymce-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@ function cmsTinyMceInit(winWidth, winHeight, allowResize) {
file_picker_types: 'file image media',
file_picker_callback: cmsTinyFileBrowserCallback,
promotion: false,
convert_unsafe_embeds: true,
plugins: 'image link lists media charmap searchreplace visualblocks table preview code codesample help',
toolbar1: 'bold italic underline strikethrough sub sup | blocks forecolor backcolor | blockquote alignleft aligncenter alignright alignjustify outdent indent | help | ',
toolbar2: 'undo redo searchreplace | bullist numlist | removeformat pastetext | link unlink anchor image media customfilebrowser | charmap codesample code preview visualblocks',
removed_menuitems: 'newdocument help',
codesample_languages: [
{ text: 'HTML', value: 'markup' },
{ text: 'XML', value: 'xml' },
{ text: 'Bash', value: 'bash' },
{ text: 'JavaScript', value: 'javascript' },
{ text: 'CSS', value: 'css' },
{ text: 'SQL', value: 'sql' },
{ text: 'PHP', value: 'php' },
{ text: 'Ruby', value: 'ruby' },
{ text: 'Python', value: 'python' },
{ text: 'Java', value: 'java' },
{ text: 'C', value: 'c' },
{ text: 'C#', value: 'csharp' },
{ text: 'C++', value: 'cpp' }
{ text: 'HTML', value: 'markup' },
{ text: 'XML', value: 'xml' },
{ text: 'Bash', value: 'bash' },
{ text: 'JavaScript', value: 'javascript' },
{ text: 'CSS', value: 'css' },
{ text: 'SQL', value: 'sql' },
{ text: 'PHP', value: 'php' },
{ text: 'Ruby', value: 'ruby' },
{ text: 'Python', value: 'python' },
{ text: 'Java', value: 'java' },
{ text: 'C', value: 'c' },
{ text: 'C#', value: 'csharp' },
{ text: 'C++', value: 'cpp' }
],
resize: tinyBrowseResize,
width: tinyBrowseWidth,
Expand Down
5 changes: 3 additions & 2 deletions CMSAdmin/c3-admin/about.aspx.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Carrotware.CMS.Core;
using System;

/*
* CarrotCake CMS
Expand All @@ -15,7 +16,7 @@ namespace Carrotware.CMS.UI.Admin.c3_admin {
public partial class about : AdminBasePage {

protected void Page_Load(object sender, EventArgs e) {
litVersion.Text = CurrentDLLVersion;
litVersion.Text = SiteData.CarrotCakeCMSVersionShort;
}
}
}
18 changes: 15 additions & 3 deletions CMSCore/SiteContent/SiteDataStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ public static bool IsPageReal {
}
}

static private List<string> _specialFiles = null;
private static List<string> _specialFiles = null;

public static List<string> SpecialFiles {
get {
Expand Down Expand Up @@ -904,21 +904,33 @@ public static string CurrentDLLMajorMinorVersion {
}
}

public static string CarrotCakeCMSVersionShort {
get {
#if DEBUG
return string.Format("Web Forms {0} (debug)", CurrentDLLVersion);
#else
return string.Format("Web Forms {0}", CurrentDLLVersion);
#endif
}
}

public static string CarrotCakeCMSVersion {
get {
#if DEBUG
return string.Format("CarrotCake CMS {0} DEBUG MODE", CurrentDLLVersion);
#endif
#else
return string.Format("CarrotCake CMS {0}", CurrentDLLVersion);
#endif
}
}

public static string CarrotCakeCMSVersionMM {
get {
#if DEBUG
return string.Format("CarrotCake CMS {0} (debug)", CurrentDLLMajorMinorVersion);
#endif
#else
return string.Format("CarrotCake CMS {0}", CurrentDLLMajorMinorVersion);
#endif
}
}

Expand Down
6 changes: 4 additions & 2 deletions CarrotCMSData/CarrotCMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ public static CarrotCMSDataContext GetDataContext(string connection) {
iDBConnCounter = 0;
}
return _db;
#endif
#else
return new CarrotCMSDataContext(connection);
#endif
}

public static CarrotCMSDataContext GetDataContext(IDbConnection connection) {
Expand All @@ -48,8 +49,9 @@ public static CarrotCMSDataContext GetDataContext(IDbConnection connection) {
iDBConnCounter = 0;
}
return _db;
#endif
#else
return new CarrotCMSDataContext(connection);
#endif
}

//public CarrotCMSDataContext() :
Expand Down
11 changes: 7 additions & 4 deletions PluginCalendarModule/Site1.Master
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,23 @@
});
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.10.7/tinymce.min.js" integrity="sha512-Ckge7OuE2kEtJHLhA8wnsn3aEImoJpk3k4MAhbGnGVlxYAgx/5uv/MYdPTzuX6/dCwbPriGxylCRhTKcRd0MZQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@* https://cdnjs.com/libraries/tinymce/6.8.3 *@
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.3/tinymce.min.js" integrity="sha512-VCEWnpOl7PIhbYMcb64pqGZYez41C2uws/M/mDdGPy+vtEJHd9BqbShE4/VNnnZdr7YCPOjd+CBmYca/7WWWCw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script type="text/javascript">
function cmsTinyMceInit(w, h, r) {
tinymce.init({
selector: "textarea.mceEditor",
promotion: false,
convert_unsafe_embeds: true,
height: h,
width: w,
resize: r,
menubar: false,
plugins: 'image imagetools link lists media charmap searchreplace visualblocks paste print table preview code codesample help',
plugins: 'image link lists media charmap searchreplace visualblocks table preview code codesample help',
toolbar: [
'undo redo | formatselect forecolor backcolor | bold italic backcolor | bullist numlist outdent indent | help',
'bold italic underline strikethrough sub sup | alignleft aligncenter alignright alignjustify | removeformat pastetext charmap | codesample code preview visualblocks'
'bold italic underline strikethrough sub sup | blocks forecolor backcolor | blockquote alignleft aligncenter alignright alignjustify outdent indent | help | ',
'undo redo searchreplace | bullist numlist | removeformat pastetext | link unlink anchor image media customfilebrowser | charmap codesample code preview visualblocks'
],
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
Expand Down

0 comments on commit a415bb4

Please sign in to comment.