Last active
January 31, 2022 17:00
-
-
Save stevewithington/7451982 to your computer and use it in GitHub Desktop.
Mura CMS : Example of how to create a custom instance of CKEditor with CKFinder in Mura CMS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Form more information on configuration of CKFinder, visit: | |
http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.html#.setupCKEditor | |
---> | |
<cfoutput> | |
<form> | |
<label for="yourTextAreaID">Your Message</label> | |
<textarea id="yourTextAreaID" name="frm-message" class="htmlEditor"> | |
</textarea> | |
</form> | |
<script> | |
$(document).ready(function() { | |
$('textarea##yourTextAreaID').ckeditor( | |
{ | |
toolbar: 'Default' | |
, customConfig: context + '/requirements/ckeditor/config.js.cfm' | |
} | |
, customHtmlEditorOnComplete | |
); | |
}); | |
function customHtmlEditorOnComplete(editorInstance) { | |
var instance = $(editorInstance).ckeditorGet(); | |
instance.resetDirty(); | |
CKFinder.setupCKEditor(instance , { basePath: context + '/requirements/ckfinder/' }); | |
} | |
</script> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please could someone tell us how we get the:
context
Path?
Otherwise, this brilliant code is useless. Thanks...