News:

Wondering if this will always be free?  See why free is better.

Main Menu

SCEditor Integration for SMF 2.0.x

Started by live627, April 07, 2022, 07:12:41 PM

Previous topic - Next topic

live627

Link to the mod

SCEditor Integration for SMF 2.0.x

Integrates SCEditor into your SMF 2.0 forum, retaining the same button layout and familiar icons.
  • Full reply integration
    • It works with third party scripts that use the WYSIWYG editor
  • Quick reply integration
  • Quick edit integration
    • Only works if quick reply is enabled; falls back to the simple textarea otherwise

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

  • This modification is licensed under the unlicense. A full copy of this license is included in the package file.
  • SCEditor is licensed under the MIT license.


Changelog

Version 1.1.0:
  • Add integrate_sceditor_options

Version 1.0.1:
  • Don't show the smiley popup if no smileys are in the popup

Version 1.0.0:
  • Initial release

live627


Gryzor

Does it have any advantages compared to the 2.1 editor?

live627

Differences between this mod and the 2.1 editor:

  • It adds a visual table selector that goes up to a 12x12 grid
  • It has a slightly different smiley popup
  • dropdowns have some reordered elements as seen in the screenshots on the mod page
  • it retains button rows from the 2.0 editor
  • the line in the button to choose color matches color of selected text in the WYSIWYG editor

The actual editor part has no appreciable difference

Gryzor


Shades.

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.

You cannot view this attachment.

You cannot view this attachment.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

GL700Wing

Hi @live627,

I'm currently updating the 'Post and PM Inline Attachments' mod for SMF 2.0 and if possible I'd like to add support for your SCEditor mod.

The 'Post and PM Inline Attachments' mod currently supports the AdvancedEditor mod and the discontinued SCEditor4SMF 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 ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on April 15, 2022, 10:46:41 AMHi @live627,

I'm currently updating the 'Post and PM Inline Attachments' 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 . '] \');'
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

live627

The version of SCEditor included in this mod contains all public functions provided by SCEditor v3.0.0. I may have removed the jQuery-escque event functions.

Advertisement: