mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
stuff is working more and more
This commit is contained in:
parent
bea183d23f
commit
8e1b30b2ad
4 changed files with 30 additions and 16 deletions
|
@ -87,7 +87,14 @@ input[type=text] {
|
|||
.menu .item:first-child {
|
||||
border-left:none;
|
||||
}
|
||||
|
||||
.menu {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.drop {
|
||||
border: 1px solid #dbdbdb;
|
||||
padding: 14px;
|
||||
|
|
|
@ -87,7 +87,14 @@ input[type=text] {
|
|||
.menu .item:first-child {
|
||||
border-left:none;
|
||||
}
|
||||
|
||||
.menu {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.drop {
|
||||
border: 1px solid #dbdbdb;
|
||||
padding: 14px;
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<div class="menu" contenteditable="false">
|
||||
<div class="group">
|
||||
<div data-action="bold" data-value="" class="item"><i class="fa fa-bold"></i></div>
|
||||
<div data-action="italic" data-value="" class="item"><i class="fa fa-italic"></i></div>
|
||||
<div data-action="underline" data-value="" class="item"><i class="fa fa-underline"></i></div>
|
||||
<div id="selectFont" data-action="selectFont" data-value="" class="item">
|
||||
<div data-action="bold" class="item"><i class="fa fa-bold"></i></div>
|
||||
<div data-action="italic" class="item"><i class="fa fa-italic"></i></div>
|
||||
<div data-action="underline" class="item"><i class="fa fa-underline"></i></div>
|
||||
<div id="selectFont" data-action="selectFont" class="item">
|
||||
<i class="fa fa-font"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<div id="makeLink" data-action="makeLink" data-value=""class="item"><i class="fa fa-link"></i></div>
|
||||
<div data-action="makeOrderedList" data-value="" class="item"><i class="fa fa-list"></i></div>
|
||||
<div id="insertImage" data-action="insertImage" data-value="" class="item">
|
||||
<div id="makeLink" data-action="makeLink" class="item"><i class="fa fa-link"></i></div>
|
||||
<div data-action="makeOrderedList" class="item"><i class="fa fa-list"></i></div>
|
||||
<div id="insertImage" data-action="insertImage" class="item">
|
||||
<i class="fa fa-picture-o"></i>
|
||||
</div>
|
||||
<div data-action="increaseQuoteLevel" data-value="" class="item"><i class="fa fa-quote-right"></i></div>
|
||||
<div data-action="increaseQuoteLevel" class="item"><i class="fa fa-quote-right"></i></div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div data-action="undo" data-value="" class="item"><i class="fa fa-undo"></i></div>
|
||||
<div data-action="redo" data-value="" class="item"><i class="fa fa-undo flip"></i></div>
|
||||
<div data-action="undo" class="item"><i class="fa fa-undo"></i></div>
|
||||
<div data-action="redo" class="item"><i class="fa fa-undo flip"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templates hidden">
|
||||
|
@ -31,13 +31,13 @@
|
|||
<div id="drop-link">
|
||||
<label>Insert Link</label>
|
||||
<i class="fa fa-chevron-up quit"></i>
|
||||
<input placeholder="Link URL" type="text" id="url" />
|
||||
<input value="http://" type="text" id="url" />
|
||||
<div class="btn submitLink">Insert</div>
|
||||
</div>
|
||||
<div id="drop-image">
|
||||
<label>Insert Image</label>
|
||||
<i class="fa fa-chevron-up quit"></i>
|
||||
<input placeholder="Image URL" type="text" id="imageUrl" />
|
||||
<input value="http://" placeholder="Image URL" type="text" id="imageUrl" />
|
||||
<div class="btn sumbitImageURL">Insert</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,8 +49,7 @@ $(document).ready(function() {
|
|||
|
||||
$('.submitLink').click(function () {
|
||||
editor = iframe.contentWindow.editor;
|
||||
url = $(this).parent().children('#url').first()[0];
|
||||
editor.makeLink(url.value);
|
||||
editor.makeLink($(this).parent().children('#url').first().val());
|
||||
$(this).parent().parent().removeClass('drop-open');
|
||||
$(this).parent().children('#url').attr('value', '');
|
||||
});
|
||||
|
@ -115,6 +114,7 @@ $(document).ready(function() {
|
|||
} else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
|
||||
// do nothing these are dropdowns.
|
||||
} else {
|
||||
console.log($(this).data('action'));
|
||||
editor[$(this).data('action')]();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue