Skip to content

Commit

Permalink
add html source view & find and replace button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldtone committed Apr 6, 2019
1 parent 159dd1b commit c807ba7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions public/js/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,13 +471,13 @@ function initEditor() {
// skin : "custom",
language: Api.curLang.indexOf('zh') >= 0 ? 'zh' : 'en', // 语言
plugins: [
"autolink link image leaui_mindmap lists charmap hr", "paste",
"code autolink link image leaui_mindmap lists charmap hr", "paste",
"searchreplace leanote_nav leanote_code tabfocus",
"table directionality textcolor"
], // nonbreaking

toolbar1: "formatselect | forecolor backcolor | bold italic underline strikethrough | image leaui_mindmap | leanote_code leanote_inline_code | bullist numlist | alignleft aligncenter alignright alignjustify",
toolbar2: "outdent indent blockquote | link unlink | table | hr removeformat | subscript superscript |searchreplace | pastetext | leanote_ace_pre | fontselect fontsizeselect",
toolbar2: "outdent indent blockquote | link unlink | table | hr removeformat | subscript superscript | searchreplace | pastetext | leanote_ace_pre code | fontselect fontsizeselect",

// 使用tab键: http://www.tinymce.com/wiki.php/Plugin3x:nonbreaking
// http://stackoverflow.com/questions/13543220/tiny-mce-how-to-allow-people-to-indent
Expand Down
4 changes: 2 additions & 2 deletions public/tinymce/plugins/code/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ tinymce.PluginManager.add('code', function(editor) {
editor.addCommand("mceCodeEditor", showDialog);

editor.addButton('code', {
icon: 'code',
icon: 'browse',
tooltip: 'Source code',
onclick: showDialog
});

editor.addMenuItem('code', {
icon: 'code',
icon: 'browse',
text: 'Source code',
context: 'tools',
onclick: showDialog
Expand Down
2 changes: 1 addition & 1 deletion public/tinymce/plugins/code/plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit c807ba7

@donaldtone
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things:

  1. fix tinymce toolbar missed button “find and replace”
  2. use tinymce plugin "code" to show html source code.
    change the "code" plugin icon to "browse" because of leanote_code using the icon "code".

Please sign in to comment.