[TinyMCE] Adds clear buttons to TinyMCE Editor For CMSimple

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

[TinyMCE] Adds clear buttons to TinyMCE Editor For CMSimple

Postby utaka » Sat Oct 03, 2015 6:20 am

== Adds clear buttons to TinyMCE Editor For CMSimple and Other===

For TinyMCE4 is here viewtopic.php?f=12&t=9279#p49705


---------- The following are TinyMCE3 ----------
Image
The added clear buttons

Image
The html block in Editor(img sample is WP)

Tested up to: CMSimple_XH 1.6.7 (TinyMCE Version: 3.5.11 (2014-05-08))


The bulk of the work is done by the tinyMCE plugin component, which was written by Miguel Ibero as a plugin for wordpress (http://wordpress.org/extend/plugins/tin ... ar-buttons)

Here is information on the original wordpress plugin:

/*
Plugin Name: TinyMCE Clear
Plugin URI: http://www.peix.org/code/tinymce-clear-buttons
Description: Enables TinyMCE clear buttons
Version: 1.1
Author: Miguel Ibero
Author URI: http://www.peix.org


== Installation ==

#1:Download
http://wordpress.org/extend/plugins/tin ... ar-buttons
( or drupal_Site: https://www.drupal.org/project/wysiwyg_clearfloats)
*wordpress_Site's plugins/clear is same drupal_Site's.
#2. Unzip.
#3. Upload to the plugins directory

tinymce-clear-buttons.1.1/tinymce-clear-buttons/mce/clear ---> (CMSimple)/plugins/tinymce/tiny_mce/plugins/clear

( or if you download from Drupal_Site,
wysiwyg_clearfloats-6.x-1.0/wysiwyg_clearfloats/tinymce/clear ---> (CMSimple)/plugins/tinymce/tiny_mce/plugins/clear)

######## Copy Lang File ####
*The plugin interface is in English and Spanish Only!!

...../clear/langs/en.js --> .../clear/langs/your country.js

#### OPEN .../clear/langs/your country.js ####
##Edit ##
tinyMCE.addI18n('en.clear',{ ----> tinyMCE.addI18n('your country.clear',{
   *If necessary, the translation

## SAVE and UPload .../clear/langs/your country.js ####
 *It does not change the character code at the time of the save

#4. EDIT init file.

###### OPEN ex. init_full.js ####

(CMSimple)/plugins/tinymce/inits/init_full.js

###### FIND ( about Line7) ####

Code: Select all

   plugins : "advimage,advlink,autosave,contextmenu,emotions,fullscreen,inlinepopups,insertdatetime,lists,media,paste,save,searchreplace,table,wordcount",


### IN-LINE FIND

",

### IN-LINE ADD BEFORE

,clear

####### FIND ( about Line19) ####

Code: Select all

    theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,outdent,indent,blockquote",


### IN-LINE FIND

",

### IN-LINE ADD BEFORE

,|,clearleft,clearright,clearboth

######## FIND ( about Line49 :fullscreen_settings) ####

Code: Select all

   theme_advanced_buttons1 : "save,|,fullscreen,code,|,formatselect,fontselect,fontsizeselect,styleselect,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,outdent,indent,blockquote",


### IN-LINE FIND

",

### IN-LINE ADD BEFORE

,|,clearleft,clearright,clearboth



###### SAVE (and Upload) #######################

*IF Botton' Alt is "clear.clearleft_desc" (ex. pouup botton's name is "clear.clearleft_desc")
Check .../clear/langs/your country.js
tinyMCE.addI18n('en.clear',{ ----> tinyMCE.addI18n('your country.clear',{
*IF Botton' Alt is "garbling" .
Check the character code at the time of the save ' .../clear/langs/your country.js'
*If It does not appear change,
  Clear your browser's cache


init_full.js :New File

Code: Select all

{
    // General options
    document_base_url: "%BASE_URL%",
   theme : "advanced",
    element_format : "%ELEMENT_FORMAT%",
    language : "%LANGUAGE%",
    plugins : "advimage,advlink,autosave,contextmenu,emotions,fullscreen,inlinepopups,insertdatetime,lists,media,paste,save,searchreplace,table,wordcount,clear",

    /*
    style_formats : [
        {title : "Normal", block : "p", classes : true , remove : "all", exact : false},
        {title : "Teaser", block : "p", classes : "teaser", exact : true},
        {title : "Zitat",  block : "p", classes : "zitat", exact : false },
    ],
    */

    // Theme options
    theme_advanced_buttons1 : "save,|,fullscreen,code,formatselect,fontselect,fontsizeselect,styleselect",
    theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,outdent,indent,blockquote,|,clearleft,clearright,clearboth",
    theme_advanced_buttons3 : "undo,redo,|,link,unlink,anchor,image,media,cleanup,|,hr,removeformat,visualaid,|,forecolor,backcolor,|,search,replace,|,charmap",
    theme_advanced_buttons4 : "emotions,sub,sup,|,tablecontrols,insertdate,inserttime,help",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,

    // %PAGEHEADERS% = h1...hx for new pages, %NAMED_PAGEHEADERS% =  1. Level pageheader=h1 ...hx, %HEADERS% = remaining hy...h6
    theme_advanced_blockformats : "%HEADERS%,p=p,div=div,%PAGEHEADERS%,code=code,pre=pre,dt=dt,dd=dd",
    theme_advanced_font_sizes : "8px=8px,10px=10px,12px=12px,14px=14px,16px=16px,18px=18px,20px=20px,24px=24px,36px=36px",

    content_css : "%STYLESHEET%",

    //link and image list
    external_image_list_url : "%TINY_FOLDER%cms_image_list.js",
    external_link_list_url : "%TINY_FOLDER%cms_link_list.js",

    // Extra
    plugin_insertdate_dateFormat: "%d-%m-%Y",
    plugin_insertdate_timeFormat: "%H:%M:%S",
    inline_styles : true,
    apply_source_formatting : true,
    relative_urls : true,
    convert_urls : false,
    entity_encoding : "raw",

    file_browser_callback : "%FILEBROWSER_CALLBACK%",
    fullscreen_new_window : false ,
    fullscreen_settings : {
   theme_advanced_buttons1 : "save,|,fullscreen,code,|,formatselect,fontselect,fontsizeselect,styleselect,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,outdent,indent,blockquote,|,clearleft,clearright,clearboth",
   theme_advanced_buttons2  : "undo,redo,|,link,unlink,anchor,image,media,cleanup,|,hr,removeformat,visualaid,|,forecolor,backcolor,|,search,replace,|,charmap,emotions,|,sub,sup,|,tablecontrols,insertdate,inserttime,|,help",
   theme_advanced_buttons3 : "",
   theme_advanced_buttons4 : ""
    }
}
Last edited by utaka on Tue Dec 05, 2017 8:59 pm, edited 2 times in total.
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

For TinyMCE4

Postby utaka » Mon Oct 12, 2015 8:39 pm

For tinyMCE4CMSimple_XH

tinyMCE4CMSimple_XH is http://cmsimpleforum.com/viewtopic.php?f=12&t=7017
tinyMCE4CMSimple_XH's Download site is http://sourceforge.net/projects/tinymce4cmsimplexh/

2017/12 New Type Release! compat3x unnecessary type  
See viewtopic.php?f=12&t=9279&p=64023#p64023




-------------------- The following are old (compat3x required type)--------------------------------------------------
First!
Plugin:compat3x is required!!
If you're using tinyMCE4CMSimple_XH < 4.1.2.5, Do the http://cmsimpleforum.com/viewtopic.php? ... 703#p49703
*Plugin:compat3x
http://www.tinymce.com/wiki.php/Plugin:compat3x


== Installation ==
1. Download plugin: tinymce-clear-buttons For TinyMCE4.
2. Unzip.
3. Upload to the TinyMCE plugins directory (tinymce/plugins/).
mce/clear ---> tinymce/plugins/clear

4.Add this to your TinyMCE script:
ex.
plugins/tinymce4/inits/init_full.js
Add "compat3x clear"

Code: Select all

  plugins: [
    "advlist anchor autolink autosave charmap code contextmenu emoticons fullscreen hr",
    "image importcss insertdatetime link lists media nonbreaking paste",
    "save searchreplace table textcolor visualblocks visualchars wordcount"
  ],
to

Code: Select all

  plugins: [
    "advlist anchor autolink autosave charmap code contextmenu emoticons fullscreen hr",
    "image importcss insertdatetime link lists media nonbreaking paste",
    "save searchreplace table textcolor visualblocks visualchars wordcount",
    "compat3x clear"
  ],


Add " clearleft clearright clearboth "

Code: Select all

 toolbar2: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify cut copy paste pastetext | bullist numlist outdent indent blockquote",
to

Code: Select all

  toolbar2: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify cut copy paste pastetext | bullist numlist outdent indent blockquote | clearleft clearright clearboth",



*if you change Languege file , save in UTF8 code.
*if It does not appear change,Clear your browser's cache.
Last edited by utaka on Wed Dec 06, 2017 9:33 am, edited 2 times in total.
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----

manu
Posts: 618
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Adds clear buttons to TinyMCE Editor For CMSimple

Postby manu » Tue Oct 13, 2015 12:06 pm

Whats the benefit instead of just to define style formats for clear left/-right/-both?

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

Re: Adds clear buttons to TinyMCE Editor For CMSimple

Postby utaka » Tue Oct 13, 2015 2:20 pm

Hi !
I think control of floar that's effective.

ex.It is a function that can be used only in the Pro version also by WordPress plug-ins.
https://wordpress.org/plugins/wp-edit/
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----

utaka
Posts: 52
Joined: Fri Sep 18, 2015 6:00 am
Location: japanese
Contact:

Re: [TinyMCE] Adds clear buttons to TinyMCE Editor For CMSimple

Postby utaka » Tue Dec 05, 2017 4:00 pm

New Type Release! For TinyMCE4

compat3x unnecessary type
Image
Get https://github.com/bbfriend/Clear-Floats-Button

Tested on CMSimple_XH 1.7.1
******************************************************
Japan Site http://cmsimple-jp.org
Twitter Googe+ github
*I English is not a good . I'm sorry...
*Ich habe nicht eine gut Deutsch. Es tut mir leid ...
*Jeg kender ikke dansk
--Powered by Google Translate-----


Return to “Addons and Plugins”

Who is online

Users browsing this forum: No registered users and 3 guests