A copy of my editor mod for v3 - in progress because some bbcode/smilies might need adding to format comment but this is easy to add afterwards just need some testers to finish this off
and here is the docs https://www.sceditor.com/documentation/options/
header.php with the other linked css stuff
Add the js
this line needs to go underneath the above code or below all the js links
Please take note in the last piece of code we use example to link (textarea var textarea = document.getElementById('example');)
so all textareas with the editor need to be tagged/id with example
This is a example of forum if you search forum.php for textbbcode("Form", "body"); there is 2
And replace with
There is one textbbcode("Form", "body"); in insert_compose_frame() as well
ill go through smilies and some bbcode later to finish this off
Finally add folder sceditor to root
and here is the docs https://www.sceditor.com/documentation/options/
header.php with the other linked css stuff
<link rel="stylesheet" href="sceditor/minified/themes/default.min.css" id="theme-style" />Add the js
<script src="sceditor/minified/sceditor.min.js"></script>
<script src="sceditor/minified/icons/monocons.js"></script>
<script src="sceditor/minified/formats/bbcode.js"></script>this line needs to go underneath the above code or below all the js links
<script>
// Replace the textarea #example with SCEditor
var textarea = document.getElementById('example');
sceditor.create(textarea, {
format: 'bbcode',
style: 'minified/themes/content/default.min.css',
startInSourceMode: true,
toolbar: 'bold,italic,underline,strike,left,center,right,font,size,color,cut,copy,paste,code,quote,image,link,emoticon,youtube,source',
emoticonsRoot: "<?php echo $site_config['SITEURL'] ?>/sceditor/",
emoticonsCompat: true
});
</script>Please take note in the last piece of code we use example to link (textarea var textarea = document.getElementById('example');)
so all textareas with the editor need to be tagged/id with example
This is a example of forum if you search forum.php for textbbcode("Form", "body"); there is 2
And replace with
<textarea id='example' style='height:300px;width:80%;' name='body' rows='13'></textarea>There is one textbbcode("Form", "body"); in insert_compose_frame() as well
ill go through smilies and some bbcode later to finish this off
Finally add folder sceditor to root
Last edited by M-jay
on 2021-02-16 22:39:52
on 2021-02-16 22:39:52