Commit e4e5e192 authored by Matija Obreza's avatar Matija Obreza
Browse files

TinyMCE with cleanup and code editing, included base uri (/lang/)

parent fbbdee68
......@@ -89,10 +89,7 @@
<content tag="javascript">
<script type="text/javascript">
jQuery(document).ready(function () {
if (window.location.hash == '#raw') {
} else {
<local:tinyMCE selector=".html-editor" directionality="document.getElementById('editForm').dir" />
}
<local:tinyMCE selector=".html-editor" directionality="document.getElementById('editForm').dir" />
});
</script>
</content>
......
......@@ -21,9 +21,6 @@
<a href="<c:url value="/content/${article.slug}/edit" />" class="btn btn-default">
<spring:message code="edit" />
</a>
<a href="<c:url value="/content/${article.slug}/edit#raw" />" class="btn btn-default">
<spring:message code="edit" />
</a>
<input type="submit" name="fetch-all" class="btn btn-default" value="<spring:message code="article.fetch-from-transifex" />" />
</form>
......
<%@ tag description="Make textarea into tinyMCE" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="selector" required="true" type="java.lang.String" %>
<%@ attribute name="menubar" required="false" type="java.lang.Boolean" %>
<%@ attribute name="statusbar" required="false" type="java.lang.Boolean" %>
......@@ -21,12 +22,14 @@
%>
jQuery(document).ready(function () {
tinyMCE.init({
selector: "<%= selector %>",
selector: '<%= selector %>',
menubar: <%= menubar %>,
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | cleanup removeformat code',
statusbar: <%= statusbar %>,
height: <%= height %>,
plugins: "link autolink code",
plugins: 'link autolink code',
directionality: <%= directionality %>,
convert_urls: false
convert_urls: false,
document_base_url: '<c:url value="/" />'
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment