forked from xdan/jodit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
133 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { IJodit } from "./src/types/jodit" | ||
declare var Jodit: IJodit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
paths: [ | ||
'./plugins/emoji/', | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.jodit_emoji { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
// Config.prototype.controls.emoji = { | ||
// icon: 'plugins/emoji/icon.svg', | ||
// tooltip: 'Insert Emoji' | ||
// } as IControlType; | ||
|
||
/** | ||
* Support emoji | ||
*/ | ||
Jodit.plugins.emoji = class emoji { | ||
afterInit(editor: any) { | ||
// const buttons = editor.options.buttons; | ||
// | ||
// if (!buttons.includes('emoji')) { | ||
// buttons.push('emoji'); | ||
// } | ||
// | ||
// editor.options.buttons = buttons; | ||
} | ||
|
||
beforeDestruct(editor: any) { | ||
|
||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
|
||
function createEntries(directory) { | ||
const rootPath = path.resolve(process.cwd()); | ||
const fullPath = path.resolve(directory); | ||
const files = fs.readdirSync(fullPath); | ||
|
||
return files.reduce((entries, file) => { | ||
let filename = path.join(fullPath, file); | ||
|
||
if (fs.lstatSync(filename).isFile()) { | ||
filename = filename.replace(rootPath, '.'); | ||
entries[filename.replace(/\.ts$/, '')] = filename; | ||
} else { | ||
Object.assign(entries, createEntries(filename)) | ||
} | ||
|
||
return entries; | ||
}, {}) | ||
} | ||
|
||
module.exports = { | ||
createEntries | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
MIT License http://www.opensource.org/licenses/mit-license.php | ||
Author Tobias Koppers @sokra | ||
*/ | ||
module.exports = function(content) { | ||
this.cacheable && this.cacheable(); | ||
this.value = content; | ||
return "module.exports = " + JSON.stringify( | ||
content | ||
.replace(/[\n\t]+/g, '') | ||
.replace(/[\s]+/g, ' ') | ||
); | ||
}; | ||
|
||
module.exports.seperable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters