Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: live627 on April 07, 2022, 07:12:41 PM

Title: SCEditor Integration for SMF 2.0.x
Post by: live627 on April 07, 2022, 07:12:41 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4319)

SCEditor Integration for SMF 2.0.x

Integrates SCEditor (http://www.sceditor.com/) into your SMF 2.0 forum, retaining the same button layout and familiar icons.

Any mods that add toolbar buttons will still work as expected. Raw bbcodes will be shown in the WYSIWYG editor for them.

Also adds integrate_sceditor_options] to allow mods to change $sce_options and possibly enable compatibility with SMF  2.1 mods that extend SCEditor. See https://www.simplemachines.org/community/index.php?topic=581766.msg4119305#msg4119305 for a tentative list.


Settings

There are no settings. Install to enable, uninstall to disable.


License



Changelog

Version 1.1.0:

Version 1.0.1:

Version 1.0.0:
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: live627 on April 07, 2022, 08:24:20 PM
reserved for future use
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: Gryzor on April 08, 2022, 08:19:26 AM
Does it have any advantages compared to the 2.1 editor?
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: live627 on April 08, 2022, 07:03:47 PM
Differences between this mod and the 2.1 editor:


The actual editor part has no appreciable difference
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: Gryzor on April 08, 2022, 11:51:38 PM
Thanks🙂
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: Shades. on April 09, 2022, 02:20:13 AM
Only thing I see that could be fixed maybe is the font name, size, color, hyperlink and all the buttons with options should pop up under the buttons but for me they're popping up way above the editor.

sceditor.png

sceditor2.png
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: GL700Wing on April 15, 2022, 10:46:41 AM
Hi @live627,

I'm currently updating the 'Post and PM Inline Attachments' (https://custom.simplemachines.org/index.php?mod=3770) mod for SMF 2.0 and if possible I'd like to add support for your SCEditor mod.

The 'Post and PM Inline Attachments' (https://custom.simplemachines.org/index.php?mod=3770) mod currently supports the AdvancedEditor (https://www.smfpacks.com/wysiwyg/) mod and the discontinued SCEditor4SMF (http://custom.simplemachines.org/mods/index.php?mod=3594) mod.

The integration code for these mods is as follows:
function insertAttachment(id)
{',
(file_exists($sourcedir . '/AdvancedEditor.php') && !empty($modSettings['advanced_editor_master']) ? '
sceditor.instance($smfpacksEditor("#' . $context['post_box_name'] . '").get(0)).insertText(\' [' . $ila_tag . '] \');' :
(file_exists($sourcedir . '/Subs-SCEditor.php') ? '
$(smfmod_editor).data(\'sceditor\').insertText(\' [' . $ila_tag . '] \');' : '
replaceText(\' [' . $ila_tag . '] \', document.forms.postmodify.' . $context['post_box_name'] . ');')), '
}

Would greatly appreciate it if you can let me know the 'insertText' command that would insert the ILA tag at the cursor position for this mod ...
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: GL700Wing on April 16, 2022, 02:01:37 AM
Quote from: GL700Wing on April 15, 2022, 10:46:41 AMHi @live627,

I'm currently updating the 'Post and PM Inline Attachments' (https://custom.simplemachines.org/index.php?mod=3770) mod for SMF 2.0 and if possible I'd like to add support for your SCEditor mod.

...
The following code seems to work ...
'sceditor.instance(document.forms.postmodify.message).insertText(\' [' . $ila_tag . '] \');'
Title: Re: SCEditor Integration for SMF 2.0.x
Post by: live627 on April 16, 2022, 05:12:14 AM
The version of SCEditor included in this mod contains all public functions provided by SCEditor v3.0.0 (https://www.sceditor.com/api/sceditor/). I may have removed the jQuery-escque event functions.