https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-08-26T07:34:22ZRedmineRedmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=656682015-08-26T07:34:22ZFelix Schäfer
<ul></ul><p>Whoops, seems I used opening instead of closing tags at the end of the code line, sorry (which also shows how the code button proposed in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Code highlighting toolbar button (Closed)" href="https://www.redmine.org/issues/14937">#14937</a> could be helpful :-) )</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=656892015-08-28T07:30:36ZEtienne Massip
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/65689/diff?detail_id=50545">diff</a>)</li></ul> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=656902015-08-28T07:44:14ZEtienne Massip
<ul></ul><p>This should not be done in a specific markup helper.</p>
<p>This should not be a <a href="http://c2.com/cgi/wiki?GlobalVariablesAreBad" class="external">global variable</a>, could be stored e.g. as a <code>data-markup-language</code> attribute on <code>textarea</code> component.</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=656912015-08-28T07:46:56ZFelix Schäfer
<ul></ul><p>Thanks for correcting the description.</p>
<p>A data attribute on text areas would probably work too.</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=1115202023-11-16T14:46:07ZGo MAEDA
<ul></ul><p>Since the text formatting is set at the application level, not per textarea, I think adding a new attribute to 'body' is enough.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index bcd6622a7..16a640267 100644
</span><span class="gd">--- a/app/views/layouts/base.html.erb
</span><span class="gi">+++ b/app/views/layouts/base.html.erb
</span><span class="p">@@ -17,7 +17,7 @@</span>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<span class="gd">-<body class="<%= body_css_classes %>">
</span><span class="gi">+<body class="<%= body_css_classes %>" data-text-formatting="<%= Setting.text_formatting %>">
</span> <%= call_hook :view_layouts_base_body_top %>
<div id="wrapper">
</code></pre> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=1115242023-11-17T01:03:14ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/31487">20620.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/31487/20620.patch">20620.patch</a> added</li></ul><p>Here is a patch to introduce a <code>data-text-formatting</code> attribute to the <code><body></code> tag.</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=1115322023-11-17T13:42:51ZFelix Schäfer
<ul></ul><p>Thank you. I think this should also be helpful for our use-case.</p>
<p>We look forward to this being added to core Redmine.</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=1115332023-11-18T00:11:29ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Add javascript variable for selected markup language</i> to <i>Add data-text-formatting attribute for selected markup language to body tag</i></li><li><strong>Target version</strong> set to <i>6.0.0</i></li></ul><p>Setting the target version to 6.0.0.</p> Redmine - Feature #20620: Add data-text-formatting attribute for selected markup language to body taghttps://www.redmine.org/issues/20620?journal_id=1115782023-11-21T01:04:22ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch in <a class="changeset" title="Add data-text-formatting attribute for selected markup language to body tag (#20620). Patch by G..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/22472">r22472</a>.</p>