Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created April 3, 2012 19:26
Show Gist options
  • Save eduardolundgren/2294918 to your computer and use it in GitHub Desktop.
Save eduardolundgren/2294918 to your computer and use it in GitHub Desktop.
Training-Theme
<%--
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>
<%@ include file="/html/portlet/breadcrumb/init.jsp" %>
<style>
#<portlet:namespace />editor {
height: 1000px;
position: relative;
}
</style>
<liferay-ui:breadcrumb displayStyle="<%= displayStyle %>" />
<div id="<portlet:namespace />editor"></div>
<br/>
<aui:button name="save" value="save" />
<aui:script use="aui-ace-editor">
var editorNode = A.one('#<portlet:namespace />editor');
var editor1 = new A.AceEditor({
boundingBox: editorNode,
value: 'My code',
render: true
});
A.one('#<portlet:namespace />save').on('click', function(event) {
A.one('#p_p_id_58_ .portlet-content').html(
editor1.get('value')
);
});
</aui:script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment