Hello,
I would like to allow front end user to embed images into the Tinymce editor, Is that possible? I find the Insert Image button missing in the Tinymce toolbar.
many thanks!
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hello,
I would like to allow front end user to embed images into the Tinymce editor, Is that possible? I find the Insert Image button missing in the Tinymce toolbar.
many thanks!
I put
HtmlEditorConfig:: get_active( )->addButtonsToLine(2,'ssimage','sslink');
in public function EditForm() { } in the RecordController.php file.
In the html source, I can see the ssimage, sslink buttons are added:
if((typeof tinyMCE != 'undefined')) {
tinymce.PluginManager.load("advcode", "../../../sapphire/thirdparty/tinymce-advcode/editor_plugin_src.js");
tinyMCE.init({"friendly_name":"(Please set a friendly name for this config)","priority":0,"mode":"specific_textareas","editor_selector":"htmleditor","
width":"100%","auto_resize":false,
"theme":"advanced","theme_advanced_layout_manager":"SimpleLayout",
"theme_advanced_toolbar_location":"top","theme_advanced_toolbar_align":"left",
"theme_advanced_toolbar_parent":"right","blockquote_clear_tag":"p",
"table_inline_editing":true,"safari_warning":false,"relative_urls":true,"verify_html":true,"
plugins":"contextmenu,table,emotions,paste,-advcode,spellchecker",
theme_advanced_buttons1":"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,
justifyfull,formatselect,separator,bullist,numlist,outdent,indent,blockquote,hr,charmap",
"theme_advanced_buttons2":"undo,redo,separator,cut,copy,paste,pastetext,
pasteword,spellchecker,separator,advcode,
search,replace,selectall,visualaid,separator,tablecontrols,ssimage,sslink",
"theme_advanced_buttons3":""});
}
Let my answer myself. I found this ticket
http://open.silverstripe.org/ticket/3613
and insert image and link is not allowed outside of CMS for SS2, but it is OK for SS3, which is still beta