* adjust for import js/css with js::import/css::import.
This commit is contained in:
@@ -11,8 +11,8 @@ $editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->
|
||||
/* set uid for upload. */
|
||||
$uid = uniqid('');
|
||||
?>
|
||||
<script src='<?php echo $jsRoot;?>kindeditor/kindeditor.min.js'></script>
|
||||
<script src='<?php echo $jsRoot;?>kindeditor/lang/<?php echo $editorLang;?>.js'></script>
|
||||
<?php js::import($jsRoot . 'kindeditor/kindeditor.min.js'); ?>
|
||||
<?php js::import($jsRoot . "kindeditor/lang/{$editorLang}.js");?>
|
||||
<script>
|
||||
(function($) {
|
||||
var kuid = '<?php echo $uid;?>';
|
||||
|
||||
@@ -6,8 +6,8 @@ if(!isset($config->$module->markdown->$method)) return;
|
||||
$editor = $config->$module->markdown->$method;
|
||||
$editor['id'] = explode(',', $editor['id']);
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo $jsRoot?>markdown/simplemde.min.css" type='text/css' media='screen' />
|
||||
<script type="text/javascript" charset="utf-8" src="<?php echo $jsRoot?>markdown/simplemde.min.js"></script>
|
||||
<?php css::import($jsRoot . "markdown/simplemde.min.css");?>
|
||||
<?php js::import($jsRoot . 'markdown/simplemde.min.js'); ?>
|
||||
<style>
|
||||
.CodeMirror,.CodeMirror-scroll{min-height:200px!important;}
|
||||
.CodeMirror-fullscreen + .editor-preview-side{display:block;}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script src="<?php echo $jsRoot;?>jquery/syntaxhighlighter/scripts/shCore.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $jsRoot;?>jquery/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript"></script>
|
||||
<link href="<?php echo $jsRoot;?>jquery/syntaxhighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo $jsRoot;?>jquery/syntaxhighlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
|
||||
<?php css::import($jsRoot . "jquery/syntaxhighlighter/styles/shCore.css");?>
|
||||
<?php css::import($jsRoot . "jquery/syntaxhighlighter/styles/shThemeDefault.css");?>
|
||||
<?php js::import($jsRoot . "jquery/syntaxhighlighter/scripts/shCore.js");?>
|
||||
<?php js::import($jsRoot . "jquery/syntaxhighlighter/scripts/shAutoloader.js");?>
|
||||
<script type="text/javascript">
|
||||
function path()
|
||||
{
|
||||
|
||||
+2
-10
@@ -18,19 +18,10 @@ $(function()
|
||||
});
|
||||
if(typeof(window.editor) != 'undefined')
|
||||
{
|
||||
window.editor['content'].addListener('ready', function()
|
||||
{
|
||||
$('div#content .edui-toolbar').append("<div class='edui-box edui-button edui-for-markdown edui-default'><div class='edui-default' onmouseover='toggleHover(this)' onmouseout='toggleHover(this)'><div class='edui-button-wrap edui-default' style='padding-right:4px;padding-left:4px;'><div class='edui-default' onclick='toggleEditor(\"markdown\")' title='Markdown'>Markdown</div></div></div></div>");
|
||||
});
|
||||
$('.ke-toolbar .ke-outline:last').after("<span data-name='unlink' class='ke-outline' title='Markdown' onclick='toggleEditor(\"markdown\")' style='font-size: unset; line-height: unset;'>Markdown</span>");
|
||||
}
|
||||
})
|
||||
|
||||
function toggleHover(obj)
|
||||
{
|
||||
if($(obj).hasClass('edui-state-hover')) return $(obj).removeClass('edui-state-hover');
|
||||
return $(obj).addClass('edui-state-hover');
|
||||
}
|
||||
|
||||
function toggleEditor(type)
|
||||
{
|
||||
if(type == 'html')
|
||||
@@ -44,6 +35,7 @@ function toggleEditor(type)
|
||||
$('.contentmarkdown').removeClass('hidden');
|
||||
}
|
||||
$('#contentType').val(type);
|
||||
return false;
|
||||
}
|
||||
|
||||
function initPage(type)
|
||||
|
||||
Reference in New Issue
Block a user