Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » GenericView module - Edit a HTMLText field with Tinymce

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 423 Views
  • BenWu
    Avatar
    Community Member
    87 Posts

    GenericView module - Edit a HTMLText field with Tinymce Link to this post

    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!

  • BenWu
    Avatar
    Community Member
    87 Posts

    Re: GenericView module - Edit a HTMLText field with Tinymce Link to this post

    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
  • BenWu
    Avatar
    Community Member
    87 Posts

    Re: GenericView module - Edit a HTMLText field with Tinymce Link to this post

    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

    423 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.