Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2018, 07:54 AM
Scandal's Avatar
Scandal Scandal is offline
 
Join Date: Dec 2005
Location: Athens / Greece
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Advanced Editor (WYSIWYG) in Chrome and Opera

I'm trying to find a solution to make Advanced Editor (WYSIWYG) to be working in Chrome and Opera.

Anyone could help?

Could anyone describe what's the exact issue and how "easy" is that to be fixed?
Reply With Quote
  #2  
Old 04-27-2018, 02:28 PM
Nas.er Nas.er is offline
 
Join Date: Mar 2016
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this and work for me 100%

In template: editor_toolbar_on
Find:
PHP Code:
</if>
                <
td>
                    <
div class="imagebutton" id="{$editorid}_cmd_resize_0_100"><img src="$stylevar[imgdir_editor]/resize_0.gif" width="21" height="9" alt="$vbphrase[decrease_size]/></div>
                    <
div class="imagebutton" id="{$editorid}_cmd_resize_1_100"><img src="$stylevar[imgdir_editor]/resize_1.gif" width="21" height="9" alt="$vbphrase[increase_size]/></div>
                </
td
Below Add:
PHP Code:
            <if condition="$show['wysiwyg_compatible']">
                <
td><div class="imagebutton" id="{$editorid}_cmd_switchmode"><img src="$stylevar[imgdir_editor]/switchmode.gif" width="21" height="20" alt="$vbphrase[switch_editor_mode]/></div></td>
            </if>
            <
td><div class="imagebutton" id="{$editorid}_cmd_switchmode">
                    <
p style="margin-top: 0; margin-bottom: 0"><img src="$stylevar[imgdir_editor]/switchmode.gif" width="21" height="20" alt="$vbphrase[switch_editor_mode]/></div></td
And
In template: showthread_quickreply
Find:
PHP Code:
</if>
                <
td>
                    <
div class="imagebutton"  id="{$editorid}_cmd_resize_0_100"><img  src="$stylevar[imgdir_editor]/resize_0.gif" width="21" height="9"  alt="$vbphrase[decrease_size]/></div>
                    <
div class="imagebutton"  id="{$editorid}_cmd_resize_1_100"><img  src="$stylevar[imgdir_editor]/resize_1.gif" width="21" height="9"  alt="$vbphrase[increase_size]/></div>
                </
td
Below Add:
PHP Code:
<if condition="$show['wysiwyg_compatible']">
                <
td><div class="imagebutton"  id="{$editorid}_cmd_switchmode"><img  src="$stylevar[imgdir_editor]/switchmode.gif" width="21" height="20"  alt="$vbphrase[switch_editor_mode]/></div></td>
            </if>
            <
td><div class="imagebutton" id="{$editorid}_cmd_switchmode">
                    <
p style="margin-top: 0; margin-bottom:  0"><img src="$stylevar[imgdir_editor]/switchmode.gif" width="21"  height="20" alt="$vbphrase[switch_editor_mode]"  /></div></td
Attached Images
File Type: jpg Untitled.jpg (30.7 KB, 0 views)
Reply With Quote
Благодарность от:
Scandal
  #3  
Old 04-28-2018, 08:44 AM
Scandal's Avatar
Scandal Scandal is offline
 
Join Date: Dec 2005
Location: Athens / Greece
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Nas.er

Yes, it seems it is enabling the WYSIWYG editor for Chrome.
Basically, if I just for test do this:
1. Open file /includes/functions_editor.php
2. Make the function is_wysiwyg_compatible($userchoice = -1, $editormode = 'fe') to return 2;

... will enable too the editor, but still there are issues like:
1. I cannot insert smilies. I see this on the browser console:
Code:
vbulletin_textedit.js?v=384:3865 Uncaught TypeError: Cannot read property 'createRange' of undefined
    at vB_Text_Editor.insert_text (vbulletin_textedit.js?v=384:3865)
    at vB_Text_Editor.insert_smilie (vbulletin_textedit.js?v=384:3775)
    at HTMLImageElement.vB_Text_Editor_Events.smilie_onclick (vbulletin_textedit.js?v=384:6044)
The issue is on this part of code:
Code:
			var sel = this.editdoc.selection.createRange();

			sel.pasteHTML(text);
(about function this.insert_text()).

2. Also I cannot use the insert link button. When I click it to enter a link, I see a "true" phrase linkable on the editor. Not the expected browser popup to enter the link.

Any idea?
Reply With Quote
  #4  
Old 04-28-2018, 03:03 PM
MaKayWeB MaKayWeB is offline
 
Join Date: May 2008
Location: Black Smoke
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you maybe i'm looking about 1 month now i find it solution.
Reply With Quote
  #5  
Old 04-29-2018, 12:25 PM
Scandal's Avatar
Scandal Scandal is offline
 
Join Date: Dec 2005
Location: Athens / Greece
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but just enabling the Advanced Editor with the pre-noticed issues (smilies insert, link insert) is it not make it good for the production site.
Reply With Quote
  #6  
Old 04-29-2018, 03:46 PM
Nas.er Nas.er is offline
 
Join Date: Mar 2016
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scandal View Post
Yes, but just enabling the Advanced Editor with the pre-noticed issues (smilies insert, link insert) is it not make it good for the production site.
i have no issues with that after enabling WYS editor!
Reply With Quote
  #7  
Old 04-29-2018, 07:05 PM
Scandal's Avatar
Scandal Scandal is offline
 
Join Date: Dec 2005
Location: Athens / Greece
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very strange, I still have them. I have them in two diff vB3 boards.
Reply With Quote
  #8  
Old 05-02-2018, 11:19 AM
Nas.er Nas.er is offline
 
Join Date: Mar 2016
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scandal View Post
Very strange, I still have them. I have them in two diff vB3 boards.
well. you right. after looking in my forum . but that not issue! its simpley just switch the wysiwyg button on and off when you need insert a link.
Reply With Quote
  #9  
Old 06-10-2018, 03:12 PM
hoangzu hoangzu is offline
 
Join Date: Feb 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also looking for this code too. My forum v3.8.11 not working WYSIWYG with Chrome and MS Edge on windows 10 as well.
If any one have any code for WYSIWYG with Chrome and MS Edge that it is wonderful.

Kind Regards,
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04242 seconds
  • Memory Usage 2,305KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete