Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

GenericView module - Edit a HTMLText field with Tinymce


Go to End


3 Posts   1255 Views

Avatar
BenWu

Community Member, 97 Posts

22 June 2012 at 11:42pm

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!

Avatar
BenWu

Community Member, 97 Posts

23 June 2012 at 1:23am

Edited: 23/06/2012 1:35am

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":""});
}

however, I still don't see the button :-(

Attached Files
Avatar
BenWu

Community Member, 97 Posts

23 June 2012 at 2:36am

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