MyBB Community Forums

Full Version: Quick Simple Editor [Very lightweight editor to quick reply]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Quick Simple Editor

Show lightweight BBCode editor in Quick Reply

Javascript file of this editor has only 2.09 KB (2,147 bytes) (minified ver.)
Style and color palette based in phpBB and editor code based in punBB.
This is BBCode editor and this isn't WYSIWYG editor

You can easily add more buttons in scodebutquick template, use same logic of others buttons.

SS:

[Image: WvLmgOG.png]

Demo:

http://martec.ml/editor/

User: test
Pass: test123

Ps. You need create account to test. But activation is not required.

Download:

https://github.com/martec/quicksmpeditor...ses/latest
http://community.mybb.com/mods.php?action=view&pid=409

Support and Bug Report:

This thread only to feedback. To support plz use Github https://github.com/martec/quicksmpeditor/issues
If you want to improve it feel free to submit PR in github.

Donate:

[Image: btn_donateCC_LG.gif]

Thanks.
how i add fonts selecter in it ....?
(2015-02-25, 01:33 PM)iturdu Wrote: [ -> ]how i add fonts selecter in it ....?

use same logic of other buttons...

is same logic of size button

something below


<select name="fontname" onchange="editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;" title="Font Name">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="" selected="selected">{$lang->quicksmpeditor_default}</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Impact">Impact</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Serif">Serif</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</select>
(2015-02-25, 01:54 PM)martec Wrote: [ -> ]
(2015-02-25, 01:33 PM)iturdu Wrote: [ -> ]how i add fonts selecter in it ....?

use same logic of other buttons...

is same logic of size button

something below



<select name="fontname" onchange="editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;" title="Font Name">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="" selected="selected">{$lang->quicksmpeditor_default}</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Impact">Impact</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Serif">Serif</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</select>
where i put these values ...?

i add these values in plugin file but i get error :

(2015-02-25, 01:54 PM)martec Wrote: [ -> ]use same logic of other buttons...

is same logic of size button

something below


<select name="fontname" onchange="editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;" title="Font Name">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="" selected="selected">{$lang->quicksmpeditor_default}</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Impact">Impact</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Serif">Serif</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</select>

your given code is not correct becuase you have missed so many slash in it check below code it is correct :
<select name=\"fontname\" onchange=\"editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;\" title=\"Font Name\">
    <option value=\"Arial\">Arial</option>
    <option value=\"Arial Black\">Arial Black</option>
    <option value=\"\" selected=\"selected\">{\$lang->quicksmpeditor_default}</option>
    <option value=\"Comic Sans MS\">Comic Sans MS</option>
    <option value=\"Courier New\">Courier New</option>
    <option value=\"Georgia\">Georgia</option>
    <option value=\"Impact\">Impact</option>
    <option value=\"Sans-serif\">Sans-serif</option>
    <option value=\"Serif\">Serif</option>
    <option value=\"Times New Roman\">Times New Roman</option>
    <option value=\"Trebuchet MS\">Trebuchet MS</option>
    <option value=\"Verdana\">Verdana</option>
    <option value=\"Jameel Noori Nastaleeq\">Jameel Noori Nastaleeq</option>
    <option value=\"Nafees Nataleeq\">Nafees Nastaleeq</option>
    </select>

any nice plugin for mybb lovers . thanks for this .
(2015-02-25, 02:13 PM)iturdu Wrote: [ -> ]
(2015-02-25, 01:54 PM)martec Wrote: [ -> ]
(2015-02-25, 01:33 PM)iturdu Wrote: [ -> ]how i add fonts selecter in it ....?

use same logic of other buttons...

is same logic of size button

something below



<select name="fontname" onchange="editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;" title="Font Name">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="" selected="selected">{$lang->quicksmpeditor_default}</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Impact">Impact</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Serif">Serif</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</select>
where i put these values ...?

i add these values in plugin file but i get error :

(2015-02-25, 01:54 PM)martec Wrote: [ -> ]use same logic of other buttons...

is same logic of size button

something below


<select name="fontname" onchange="editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;" title="Font Name">
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="" selected="selected">{$lang->quicksmpeditor_default}</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
<option value="Impact">Impact</option>
<option value="Sans-serif">Sans-serif</option>
<option value="Serif">Serif</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</select>

your given code is not correct becuase you have missed so many slash in it check below code it is correct :
<select name=\"fontname\" onchange=\"editor.insert_text('[font=' + this.form.fontname.options[this.form.fontname.selectedIndex].value + ']', '[/font]');this.form.fontname.selectedIndex = 2;\" title=\"Font Name\">
    <option value=\"Arial\">Arial</option>
    <option value=\"Arial Black\">Arial Black</option>
    <option value=\"\" selected=\"selected\">{\$lang->quicksmpeditor_default}</option>
    <option value=\"Comic Sans MS\">Comic Sans MS</option>
    <option value=\"Courier New\">Courier New</option>
    <option value=\"Georgia\">Georgia</option>
    <option value=\"Impact\">Impact</option>
    <option value=\"Sans-serif\">Sans-serif</option>
    <option value=\"Serif\">Serif</option>
    <option value=\"Times New Roman\">Times New Roman</option>
    <option value=\"Trebuchet MS\">Trebuchet MS</option>
    <option value=\"Verdana\">Verdana</option>
    <option value=\"Jameel Noori Nastaleeq\">Jameel Noori Nastaleeq</option>
    <option value=\"Nafees Nataleeq\">Nafees Nastaleeq</option>
    </select>

any nice plugin for mybb lovers . thanks for this .

i'm provide code to you edit scodebutquick template....
so not has any miss...
i add your provided code into the plugin file .
Could it cause any problem or not ?
(2015-02-25, 06:38 PM)iturdu Wrote: [ -> ]i add your provided code into the plugin file .
Could it cause any problem or not ?

if work... so ok...
Yes it work greatly so i am very thankful to you but i want to some more buttons like Left alignment , right , center etc ,?
Can u give me code ?
(2015-02-25, 06:50 PM)iturdu Wrote: [ -> ]Yes it work greatly so i am very thankful to you but i want to some more buttons like Left alignment , right , center etc ,?
Can u give me code ?

plz use same logic...

<input type="button" value="Left" style="width: 40px" onclick="editor.insert_text('[align=left]','[/align]')" title="Align left" />

to right, center etc... same thing...
o.k thanks .
Pages: 1 2