View Issue Details

IDProjectCategoryView StatusLast Update
0012744mantisbtuipublic2017-02-26 21:18
Reporterkaystrobach Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionduplicate 
Product Version1.2.4 
Summary0012744: WYSIWYG editor integration
Description

Hi devs,

as there some html tags allowed in most textareas i wondered, why there is no wysiwyg integration respecting that html?

I created a custom/meta.inc with the following content to solve that problem.

Regards
Kay

Steps To Reproduce

Download tinymce in custom/ and unzip it there
include meta.inc with config:

$g_meta_include_file = '%absolute_path%/custom/meta_inc.php';

Additional Information

<script type="text/javascript" src="/custom/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "spellchecker,searchreplace,print,contextmenu,paste,fullscreen,",

    // Theme options
    theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,bullist,numlist,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,code&quot;,
    theme_advanced_buttons2 : &quot;&quot;,
    theme_advanced_buttons3 : &quot;&quot;,
    theme_advanced_buttons4 : &quot;&quot;,
    theme_advanced_toolbar_location : &quot;top&quot;,
    theme_advanced_toolbar_align : &quot;left&quot;,
    theme_advanced_statusbar_location : &quot;bottom&quot;,
    theme_advanced_resizing : true,
    valid_elements : &quot;a[href|target=_blank],b/strong,i/italic,u/underline,s/strikethrough,ul,ol,li,br&quot;,
    force_br_newlines : true,
    force_p_newlines : false,
    // Skin options
    skin : &quot;o2k7&quot;,
    skin_variant : &quot;silver&quot;,

    // Example content CSS (should be your site CSS)
    content_css : &quot;css/example.css&quot;,

    // Drop lists for link/image/media/template dialogs
    template_external_list_url : &quot;js/template_list.js&quot;,
    external_link_list_url : &quot;js/link_list.js&quot;,
    external_image_list_url : &quot;js/image_list.js&quot;,
    media_external_list_url : &quot;js/media_list.js&quot;,

    // Replace values for the template plugin
    template_replace_values : {
            username : &quot;Some User&quot;,
            staffid : &quot;991234&quot;
    }

});
</script>

Tagspatch

Relationships

duplicate of 0012325 new Adding WYSIWYG editor to text areas 
related to 0017920 closedjoel Native markdown support 

Activities

kaystrobach

kaystrobach

2011-02-04 08:21

reporter   ~0028160

http://blog.kay-strobach.de/index.php/2011/02/wysiwyg-in-mantis-einbinden/

damm is related to 0012325

kaystrobach

kaystrobach

2011-02-04 08:37

reporter   ~0028162

Last edited: 2011-02-04 08:50

minimal improvements:

<script type="text/javascript" src="/custom/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "spellchecker,searchreplace,print,contextmenu,paste,fullscreen,inlinepopups",

    // Theme options
    theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,bullist,numlist,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,code&quot;,
    theme_advanced_buttons2 : &quot;&quot;,
    theme_advanced_buttons3 : &quot;&quot;,
    theme_advanced_buttons4 : &quot;&quot;,
    theme_advanced_toolbar_location : &quot;top&quot;,
    theme_advanced_toolbar_align : &quot;left&quot;,
    theme_advanced_statusbar_location : &quot;bottom&quot;,
    theme_advanced_resizing : true,
    valid_elements : &quot;a[href|target=_blank],b/strong,i/italic,u/underline,s/strikethrough,ul,ol,li,br&quot;,
    force_br_newlines : true,
    force_p_newlines : false,
    remove_linebreaks : true,
    apply_source_formatting:false,

    // Example content CSS (should be your site CSS)
    content_css : &quot;/css/default.css&quot;,

});
</script>

cas

cas

2011-02-04 10:57

reporter   ~0028163

Did you verify if the graphics are still working?
How do your emails look when using this "nice" content?

kaystrobach

kaystrobach

2011-02-04 11:14

reporter   ~0028164

Last edited: 2011-02-04 11:23

the editor creates one line of html.
so this must be parsed to text again.

BUT
removing remove_linebreaks : true,
and removing nl2br from mantis core could be an solution, as tinymce formats the html very readable.

if you mean the grafic preview on top thats working.
if you mean the relationshipgraphs (i can't test that) - my shared hosting provider has not graphviz installed :(

Perhaps GraphViz should be replaced?

r3z3

r3z3

2012-05-09 17:53

reporter   ~0031789

Hi all,

I have a problem (lines in double)
1/ I added the "remove_linebreaks" in the meta_inc.php page
2/... but what do you mean by "removing nl2br from mantis core" ... just in string_api.php ?

Thanks for your reply and sorry for my poor english :(

atnz

atnz

2014-05-25 15:27

reporter   ~0040637

Does anyone know if this works in 1.2.17? and if you can copy text off a website, and paste without all the control characters appearing?

kaystrobach

kaystrobach

2014-05-26 01:23

reporter   ~0040639

i can't really tell you, but basicly it should work.

The nl2br has to be removed on every echo of a rte enabled field in mantis

atnz

atnz

2017-01-08 15:39

reporter   ~0054981

Bump. Is there a plan for WYSIWYG to be native? or can someone update with the plugin to be used for Mantis v2.0?

atnz

atnz

2017-02-23 01:21

reporter   ~0055752

Can we please have WYSIWYG for text fields... It is such a block for people looking at the tool that you cant even bold text, underline, bullet point, provide numbered lists, etc. I'd rather have that then being able to drag and drop a file...

dregad

dregad

2017-02-23 04:36

developer   ~0055756

Resolving as duplicate of 0012325