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.

All other Modules /

Discuss all other Modules here.

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

GenericView module - Edit a HTMLText field with Tinymce


Reply


3 Posts   521 Views

Avatar
BenWu

Community Member, 90 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, 90 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, 90 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